phpretard Posted January 17, 2008 Share Posted January 17, 2008 I know this is way off. I would like to count the results of the query. Could someone please help me with this? $result = mysql_query("SELECT * FROM registration WHERE league='Instructional' AND season='$season' AND year='$year' ORDER by player_last"); while($row = mysql_fetch_array($result)) { $result1 = count($result); } echo $result1; ?> -Anthony Quote Link to comment https://forums.phpfreaks.com/topic/86472-solved-i-cant-count-past-1/ Share on other sites More sharing options...
AndyB Posted January 17, 2008 Share Posted January 17, 2008 http://www.tizag.com/mysqlTutorial/mysqlcount.php Quote Link to comment https://forums.phpfreaks.com/topic/86472-solved-i-cant-count-past-1/#findComment-441867 Share on other sites More sharing options...
revraz Posted January 17, 2008 Share Posted January 17, 2008 You may just want to use SELECT COUNT instead if you just want to count. Or you can use mysql_num_rows if you want to know how many rows were returned. Quote Link to comment https://forums.phpfreaks.com/topic/86472-solved-i-cant-count-past-1/#findComment-441868 Share on other sites More sharing options...
phpretard Posted January 17, 2008 Author Share Posted January 17, 2008 Thank you...It worked like a charm. Quote Link to comment https://forums.phpfreaks.com/topic/86472-solved-i-cant-count-past-1/#findComment-441869 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.