deansaddigh Posted February 26, 2010 Share Posted February 26, 2010 IM getting an error Warning: Wrong parameter count for mysql_num_rows() in \\nas44ent\domains\l\languageschoolsuk.com\user\htdocs\admin\view_enquiries.php on line 55 Heres the sql, i want to get the number of rows so i can do some pagination but it doesnt like it $query = "SELECT * FROM enquiry ORDER BY date DESC"; $result = mysql_query($query, $conn) or die ("Unable to perform query"); //Number of rows for pagination $rows = mysql_num_rows($query, $conn); Does anyone know what i am doing wrong Quote Link to comment Share on other sites More sharing options...
schilly Posted February 26, 2010 Share Posted February 26, 2010 mysql_num_rows accepts a result set. $rows = mysql_num_rows($result, $conn); Quote Link to comment Share on other sites More sharing options...
Andy-H Posted February 26, 2010 Share Posted February 26, 2010 mysql_num_rows accepts a result set (resource) returned by mysql_query, it does not require a resource link to the database to function as the result set is already returned by mysql_query(). Quote Link to comment 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.