user55
07-31-2007, 07:50 PM
Hi,
I keep getting the following error. What is causing this error? Any help would be appreciated.
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/mysite/public_html/demo.php on line 303
Invalid query
That error is this line, which you can see at the bottom of the code below:
$result = mysql_query($sql) or die("Invalid query") . mysql_error();
Here is the PHP Code:
$sql .= "SELECT
audit.id,
audit.month,
audit.monthlyamount,
jmas.id,
jmas.year,
jmas.productid,
quarter.id,
quarter.qamount,
quarter.company";
$sql .= "FROM
audit audit,
jmaster jmaster,
quarter quarter";
if ($currentrow_sql != "") {
$sql .= "WHERE
audit.id = jmas.id AND jmas.id = quarter.id AND .$currentrow_sql";
}
$result = mysql_query($sql) or die("Invalid query") . mysql_error();
$row = mysql_fetch_array($result);
}
___________________
Sara
I keep getting the following error. What is causing this error? Any help would be appreciated.
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/mysite/public_html/demo.php on line 303
Invalid query
That error is this line, which you can see at the bottom of the code below:
$result = mysql_query($sql) or die("Invalid query") . mysql_error();
Here is the PHP Code:
$sql .= "SELECT
audit.id,
audit.month,
audit.monthlyamount,
jmas.id,
jmas.year,
jmas.productid,
quarter.id,
quarter.qamount,
quarter.company";
$sql .= "FROM
audit audit,
jmaster jmaster,
quarter quarter";
if ($currentrow_sql != "") {
$sql .= "WHERE
audit.id = jmas.id AND jmas.id = quarter.id AND .$currentrow_sql";
}
$result = mysql_query($sql) or die("Invalid query") . mysql_error();
$row = mysql_fetch_array($result);
}
___________________
Sara