|
|
| Author |
Message |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Wed Jun 25, 2003 8:06 pm Post subject: Warning: mysql_fetch_row(): supplied argument is not a valid |
|
|
|
A tip of the hat to Humpa for this one:
Problem: 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
Idea: to find a solution: Try first to get a more descriptive error message. For this purpose, you must edit the "case" lines in the sql_layer.php.
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):
| Code: | case "MySQL":
$row = mysql_fetch_row($res);
return $row;
break;; |
Edit it like this:
| Code: | case "MySQL":
if ($row = mysql_fetch_row($res)) {
return $row;
} else {
print (mysql_error());
}
break;; |
This will NOT fix your problem. But it will give a more descriptive message as to what the error cause is. _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
timbro Private

Joined: 11 Mar 2004 Posts: 1
|
Posted: Thu Mar 11, 2004 7:26 am Post subject: |
|
|
|
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/virtual/site68/fst/var/www/html/testnuke/html/includes/sql_layer.php on line 301
Unknown column 'position' in 'where clause' |
|
| Back to top |
|
 |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Mon Mar 15, 2004 11:17 am Post subject: |
|
|
|
Yes, timbro, yours is an example of such a problem. Now you know that at some place you are asking for a column with the name "position", but that column does not exist in the table.
Conclusion: you are using an incompatible module or block. Make sure that the modules and blocks you are using are compatible with the version of your PHP-Nuke. If you upgraded PHP-Nuke, make sure that you upgraded correctly and did not miss anything. _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
stafo Private

Joined: 26 Mar 2004 Posts: 2
|
Posted: Fri Mar 26, 2004 7:48 pm Post subject: |
|
|
|
My error says:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/ladongsa/www/ykc/includes/sql_layer.php on line 286
Unknown column 'mod_group' in 'field list'
I did a clean install using nukesql both latest versions. |
|
| Back to top |
|
 |
JonStarbuck Private

Joined: 26 Mar 2004 Posts: 2
|
Posted: Fri Mar 26, 2004 8:26 pm Post subject: Same problem |
|
|
|
I get the same error msg too.
Warning: Supplied argument is not a valid MySQL result resource in
/home/jonstarbuck/public_html/mscnuke/includes/sql_layer.php on line 286 Unknown column 'mod_group' in 'field list'
The field mod_list does indeed not exist (so far as I can tell) and I am sure I used the corect installer; PHPNuke 7.1. I am less sure about the way the DB was installed, is there a correct installer for the DB to go with v7.1??
Thanks,
Jon. |
|
| Back to top |
|
 |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Fri Mar 26, 2004 9:32 pm Post subject: |
|
|
|
See the answer of koun in PHP-Nuke 7.1 No Blocks appearing. Indeed, judging from these posts, there seems to be a mismatch between version 7.1 and its web installers. _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
stafo Private

Joined: 26 Mar 2004 Posts: 2
|
Posted: Fri Mar 26, 2004 9:37 pm Post subject: |
|
|
|
Yep. I was mistaken. I was using another version of nukesql.php that didn't coincide with the version of PHPnuke I was running.
Thanks for the reply though! |
|
| Back to top |
|
 |
JonStarbuck Private

Joined: 26 Mar 2004 Posts: 2
|
Posted: Sun Mar 28, 2004 9:14 am Post subject: Thanks |
|
|
|
Yep, I was using the incorrect database installer - mismatch between it and the version of phpnuke I was using.
Thanks for your help.
Jon. |
|
| Back to top |
|
 |
Superfrappe Private

Joined: 25 Jun 2004 Posts: 1
|
Posted: Fri Jun 25, 2004 6:17 pm Post subject: |
|
|
|
Hello all. New to the forum. Also new to PHP. I know this is an older post, but I also have the same issue, and was hoping I could get a more detailed answer and help. Here's my error.. same as above:
| Code: | | Unknown column 'mod_group' in 'field list' |
I am using version 6.5 and I also used the 6.5installer.
If the column doesn't exist, can't we just create it? Am I really forced to do another complete install? I also use phpMyAdmin, so if there is an easier fix than a complete install, I'd be thrilled!
Thanks very much for your answers.
Cheers! |
|
| Back to top |
|
 |
RayCRP Private

Joined: 29 Jun 2004 Posts: 1
|
Posted: Tue Jun 29, 2004 4:13 am Post subject: |
|
|
|
| Code: | | Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/staggmus/public_html/band/marching/includes/sql_layer.php on line 286 |
What if nothing came up?  |
|
| Back to top |
|
 |
|
|
 |
|
|