ballhogjoni Posted June 23, 2007 Share Posted June 23, 2007 How can you tell(using php) how many rows are in a database table. Quote Link to comment https://forums.phpfreaks.com/topic/56853-solved-how-do-you-find-out-how-many-rows-are-in-a-table/ Share on other sites More sharing options...
chigley Posted June 23, 2007 Share Posted June 23, 2007 <?php $query = mysql_query("SELECT * FROM table") or die(mysql_error()); $rows = mysql_num_rows($query); echo "There are {$rows} rows in the table!"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/56853-solved-how-do-you-find-out-how-many-rows-are-in-a-table/#findComment-280906 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.