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 Link to comment https://forums.phpfreaks.com/topic/193413-pagination/ 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); Link to comment https://forums.phpfreaks.com/topic/193413-pagination/#findComment-1018303 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(). Link to comment https://forums.phpfreaks.com/topic/193413-pagination/#findComment-1018304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.