hlstriker Posted July 3, 2007 Share Posted July 3, 2007 Hi, how could I return the number of rows that are in a certain table? Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/ Share on other sites More sharing options...
AndyB Posted July 3, 2007 Share Posted July 3, 2007 http://www.tizag.com/mysqlTutorial/mysqlcount.php Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/#findComment-289203 Share on other sites More sharing options...
TriggerHappy Posted July 4, 2007 Share Posted July 4, 2007 try this... select count(*) from <tablename> Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/#findComment-289271 Share on other sites More sharing options...
AndyB Posted July 4, 2007 Share Posted July 4, 2007 try this... select count(*) from <tablename> er, the link in my post explained exactly how to use count(). Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/#findComment-289280 Share on other sites More sharing options...
rameshfaj Posted July 4, 2007 Share Posted July 4, 2007 if the query is to be used then use the functiond: $number_of_rows=mysql_num_rows($result_from_query); else the count can also do the job. Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/#findComment-289324 Share on other sites More sharing options...
fenway Posted July 10, 2007 Share Posted July 10, 2007 if the query is to be used then use the functiond: $number_of_rows=mysql_num_rows($result_from_query); else the count can also do the job. That is, if you actually need the rows and the count. Link to comment https://forums.phpfreaks.com/topic/58326-get-number-of-rows-in-table/#findComment-294614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.