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? Quote 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 Quote 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> Quote 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(). Quote 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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.