mysql_num_rows() will return the number of rows returned by a query. If you are performing "SELECT * from table", which will select all rows, mysql_num_rows() will return the number of rows in the table.
You say it doesn't work. What is mysql_num_rows() returning for that query?
Another way to get the number of rows in a table is to perform "SELECT count(*) from table", which will return the number of rows in a table. Want the best answers? Ask the best questions:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.