zhshero Posted December 8, 2010 Share Posted December 8, 2010 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\ipod\lib\connection.php on line 131 :S 129. function RecordCount ( $query ) 130. { 131. return mysql_num_rows( mysql_query( $query ) ); 132. } Link to comment https://forums.phpfreaks.com/topic/221006-warning-mysql_num_rows-expects-parameter/ Share on other sites More sharing options...
bh Posted December 8, 2010 Share Posted December 8, 2010 The problem is with your query. The error contains "boolean given" so your query probably returns false. For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error. For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error. Link to comment https://forums.phpfreaks.com/topic/221006-warning-mysql_num_rows-expects-parameter/#findComment-1144359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.