PDA

View Full Version : Mysql _ error Help a proffesional needed



Coolie
06-22-2007, 10:55 PM
I m gettin this error
when i try to run from a server.
www.club.phenyu.com


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\Domains\phenyu.com\SubDomains\club\game_setup.php on line 48

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\Domains\phenyu.com\SubDomains\club\game_setup.php on line 54

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in D:\Domains\phenyu.com\SubDomains\club\game_setup.php on line 57




if (!isset($_GET["view"])) $view=""; else $view=$_GET["view"];
if (!isset($_GET["play"])) $play=""; else $play=$_GET["play"];
if (!isset($_GET["reason"])) $reason=""; else $reason=$_GET["reason"];
if (!isset($_GET["rid"])) $rid=$play; else $rid=$_GET["rid"];

line no 48.
$id = mysql_fetch_array(mysql_query("SELECT id FROM $tab[user] WHERE code='$pkuser';"));
$id = $id["id"];


$getcensors = mysql_query("SELECT censor FROM $tab[censor];");
$censorwords = array();

line no.54

while($censor=mysql_fetch_array($getcensors)) {
array_push($censorwords, $censor[0]);
}

line no 57
mysql_free_result($getcensors);
Help needed here as i have more problem i wanna tackle 1 by one

thank you

jc_gmk
06-25-2007, 12:47 PM
At first glance I noticed that this may cause you a problem:
I've highlighted the bits in red:

if (!isset($_GET["view"])) $view=""; else $view=$_GET["view"];
if (!isset($_GET["play"])) $play=""; else $play=$_GET["play"];
if (!isset($_GET["reason"])) $reason=""; else $reason=$_GET["reason"];
if (!isset($_GET["rid"])) $rid=$play; else $rid=$_GET["rid"];

line no 48.
$id = mysql_fetch_array(mysql_query("SELECT id FROM $tab[user] WHERE code='$pkuser';")); // Line has been ended before the end
$id = $id["id"];


$getcensors = mysql_query("SELECT censor FROM $tab[censor];");
$censorwords = array();

line no.54

while($censor=mysql_fetch_array($getcensors)) {
array_push($censorwords, $censor[0]);
}

line no 57
mysql_free_result($getcensors);