pixeltrace Posted March 16, 2007 Share Posted March 16, 2007 guys, what is the code in displaying the total number of rows? let say in table applicant? $sql = SELECT ..... FROM applicant echo ..... ??? need help please! thanks! Link to comment https://forums.phpfreaks.com/topic/42951-solved-how-to-display-total-number-of-rows/ Share on other sites More sharing options...
lJesterl Posted March 16, 2007 Share Posted March 16, 2007 I would use this ( I could be wrong) $sql=mysql_query("SELECT * FROM applicant'"); $result=mysql_num_rows($sql); There are $result applicants Link to comment https://forums.phpfreaks.com/topic/42951-solved-how-to-display-total-number-of-rows/#findComment-208634 Share on other sites More sharing options...
DeathStar Posted March 16, 2007 Share Posted March 16, 2007 If you work with id's this would help ALOT!! $cnt = mysql_query("SELECT userid FROM users"); $membs = mysql_num_rows($cnt); Link to comment https://forums.phpfreaks.com/topic/42951-solved-how-to-display-total-number-of-rows/#findComment-208635 Share on other sites More sharing options...
Kasuke_Akira Posted March 16, 2007 Share Posted March 16, 2007 "SELECT *" is sufficient as long as there are no stipulations and you just want a total of all users. So lJesterl is correct with his code. Link to comment https://forums.phpfreaks.com/topic/42951-solved-how-to-display-total-number-of-rows/#findComment-208640 Share on other sites More sharing options...
pixeltrace Posted March 16, 2007 Author Share Posted March 16, 2007 thanks its working now! Link to comment https://forums.phpfreaks.com/topic/42951-solved-how-to-display-total-number-of-rows/#findComment-208641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.