Jump to content


Photo

HELP! Another question from a NOOOOOBIE


  • Please log in to reply
1 reply to this topic

#1 reazik

reazik
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 25 March 2006 - 02:55 AM

I keep getting an "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ----------- on line 13" error for this script (the line in question is red).
_________

<?

mysql_pconnect("localhost","xxxxxxxx","xxxxxxxx");

mysql_select_db("psnincne_JobForms");

$result = mysql_query("select * from `psnincne_job_list`");

?>

<?

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]while($r=mysql_fetch_array($result)) { [!--colorc--][/span][!--/colorc--]
$job_code = $r["job_code"];
$job_title = $r["job_title"];
$job_state = $r["job_state"];
$job_date = $r["job_date"];

echo "$job_code <br> $job_title <br> $job_state <br> $job_date";

}

?>
_________

What's the problem?

#2 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 25 March 2006 - 03:28 AM

change this:
$result = mysql_query("select * from `psnincne_job_list`"); 
to this:
$result = mysql_query("select * from `psnincne_job_list`") or die (mysql_error()); 
then post any errors




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users