Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply

Fri Nov 08, 2002 10:13 pm


For some reason I'm gettin this error when opening the webpage "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxx/public_html/viewdb.php on line 8"

Here's my php code:

$db = mysql_connect("localhost", "xxx", "xxxx");
$result = mysql_query("SELECT * FROM personnel",$db);
echo "<TABLE>";
echo "<TR><TD><B>Full Name</B><TD><B>Nick Name</B><TD><B>Salary</B></TR>";
while($myrow = mysql_fetch_array($result))
echo "<TR><TD>";
echo $myrow["firstname"];
echo " ";
echo $myrow["lastname"];
echo "<TD>";
echo $myrow["nick"];
echo "<TD>";
echo $myrow["salary"];
echo "</TABLE>";

Anyone have any ideas?????????


Fri Nov 08, 2002 10:33 pm

NO need for help now as I found out the issue....... my host puts varibles in front of my database names thus altering ( WTH)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Forath and 5 guests