-
Step 1
The first step is access the database. Most database have a facility to run sql queries. I will count the number of rows of a table on MySQL, using MyPhpAdmin.
-
Step 2
After you have logged in, identify the table that you need access to. This article assumes you already have a table in mind. The table I will use for the example is "jos_users". "jos_users" contains the users in my user table.
-
Step 3
After you have identified the table. You will need to write the sql statement. The sql statement for this query will contain the select list, in combination with a sql function. What the sql statement will not contain, is a where clause. This is because we want to know the total number of rows in the table.
-
Step 4
The sql statment looks like this (upper or lower case is fine):
SELECT count(*) FROM jos_users
Result is: 7 -
Step 5
The result of the query is "7"; however, if you run into any errors, verify the table name is correct or you have not misspelled "SELECT" or "COUNT(*)".
If you run into any issues or the job is bigger than what you originally thought, consider hiring a freelancer at surefirehire.












