Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource

3.9.2. Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource

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;;
Note 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.

 

Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 342,112,193
  • Today: 61,508
Server InfoServer Info
  • Nov 18, 2017
  • 09:06 pm PST
 
 

Daily Inspiration