-
Step 1
Launch your PHP editor. I use notepad. Any text based tool will do. Notepad is free which is why I use it, but it won't give you the ability some PHP editors will like debugging and so on.
-
Step 2
The first thing you need to do is open your database. Ehow does not allow computer code to be written within the steps, so the code will be in images associated with each step.
-
Step 3
Run your query as shown in the picture associated with this step. This particular query says to select all of the records from a table named "some_table".
-
Step 4
The command to retrieve the number of rows returned in this particular selection query is called "mysql_affected_rows". Take a look at the code in the picture associated with this step. The code says that if the number of rows returned from this query is greater than 100 then print out (echo) the statement that reads "This query as more than 100 rows in it" otherwise don't print out anything. You can also assign "mysql_affected_rows" to a value if you need to use it later in your code.








