Author |
Message |
LadySyren
Regular


Joined: Sep 03, 2004
Posts: 56
Location: Iowa
|
Posted:
Thu Nov 11, 2004 12:39 pm |
|
I keep getting this message:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /**/***/**/***/includes/sql_layer.php on line 288
Access Denied
I'm running PHPNuke 7.5. Could someone tell me how to fix this? |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Nov 11, 2004 12:47 pm |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 1:42 pm |
|
Ok I did that and it still comes up as:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Access Denied |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 2:29 pm |
|
Also, I noticed this as I was replying to a post on my forums:
Fatal error: Call to undefined function: opentable() in /xxxx/xxxx/public_html/xxxx/mainfile.php on line 329 |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 4:27 pm |
|
LadySyren wrote: | Ok I did that and it still comes up as:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Access Denied | Right above this message it should tell you what table has the problem. |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 7:46 pm |
|
Alright. I had to move the echo string up two lines as I had it in the wrong place. Now it says this:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Unknown column 'radmintopic' in 'field list' Access Denied
Also, I noticed this as I was replying to a post on my forums:
Fatal error: Call to undefined function: opentable() in /xxxx/xxxx/public_html/xxxx/mainfile.php on line 329
When I go to that area in the mainfile.php, this is what's there:
}
function title($text) {
OpenTable();
echo "<center><font class=\"title\"><b>$text</b></font></center>";
CloseTable();
echo "<br>";
}
function is_active($module) {
global $prefix, $db;
$module = trim($module);
$result = $db->sql_query("SELECT active FROM ".$prefix."_modules WHERE title='$module'");
$row = $db->sql_fetchrow($result);
$act = intval($row['active']);
if (!$result OR $act == 0) {
return 0;
} else {
return 1;
}
} |
Last edited by LadySyren on Thu Nov 11, 2004 7:50 pm; edited 1 time in total |
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 7:48 pm |
|
Here's what is happening which is almost 100% of the time the problem. The table and the block/module calling it are not in sync. The sql is referring to a column that is not in the table. |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 8:30 pm |
|
Ok, I understand what's going on now. How do I get them in sync again? Is it something as simple as running the check database/repair tables I have in my mySQL? |
Last edited by LadySyren on Thu Nov 11, 2004 8:35 pm; edited 1 time in total |
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 8:34 pm |
|
No. Either the table or the query is wrong. You have to correct whichever needs correcting, manually. |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 9:01 pm |
|
Bear with me, I'm new to this. Here's what's in there: The bolded line is line 288.
}
/*
* sql_fetch_row(&$res,$row)
* given a result identifier, returns an array with the resulting row
* Needs also a row number for compatibility with postgres
*/
function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {
case "MySQL":
$row = mysql_fetch_row($res);
echo mysql_error();
return $row;
break;;
case "mSQL":
$row = msql_fetch_row($res);
return $row;
break;;
case "postgres":
case "postgres_local":
if ( $res->get_total_rows() > $res->get_fetched_rows() ) {
$row = pg_fetch_row($res->get_result(), $res->get_fetched_rows() );
$res->increment_fetched_rows();
return $row;
} else {
return false;
}
break;; |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 9:07 pm |
|
You need to set $sql_debug=1; Then find out exactly what the query is that is failing. That line is not the problem; it's the pointer TO the problem. |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 9:37 pm |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 9:49 pm |
|
|
|
 |
LadySyren

|
Posted:
Thu Nov 11, 2004 10:26 pm |
|
Ah great, Thanks so much for all of the help. It's appreciated. I"m sure I'll be back shortly.
Edit:
I deeply apologize and feel a bit stupid right about now. I've discovered the errors and can get everything working on my own. Thank you so much for all of the help you've provided! |
|
|
|
 |
GeekyGuy
Client

Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio
|
Posted:
Fri Nov 12, 2004 1:22 pm |
|
No need to apologize here. We've all made mistakes, and I know that I take it for granted that I'll make more.
I am glad that you have figured out what caused the problem. |
_________________ "The Daytona 500 is ours! We won it, we won it, we won it!", Dale Earnhardt, February 15th, 1998, Daytona 500 |
|
 |
 |
|