You get this
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in html/includes/sql_layer.php on line 286 |
This is a very general error. Most of the time it just means that you could not connect to the database (for whatever reason) and thus the result set you tried to fetch was not a "valid MySQL result resource". You should try first to get a more descriptive error message. For this purpose, you must edit the "case" lines in the sql_layer.php file.
Example:This is the "case" that starts at line 286 in the nuke 6.5 sql_layer.php (for the line 286 error), at line 300 in the nuke 6.0 sql_layer.php (for the line 301 error message) - or line 285 in nuke 5.6 (for the line 286 error message):
case "MySQL": $row = mysql_fetch_row($res); return $row; break;; |
Edit it like this:
case "MySQL": if ($row = mysql_fetch_row($res)) { return $row; } else { print (mysql_error()); } break;; |
![]() |
Please note: |
---|---|
This will NOT fix your problem. But it will give a more descriptive message as to what the error cause is. |
See Warning: mysql fetch row: supplied argument is not a valid MySQL result resource and submit news problem.
Help us make a better PHP-Nuke HOWTO!Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum! Chris Karakas, Maintainer PHP-Nuke HOWTO |