I'm getting the error message "Warning: Supplied argument is not a valid MySQL result resource in /home/vbshelf/public_html/try.php on line 6" with the following code:
What's going wrong?PHP Code:<?php
$db = mysql_connect("localhost", "user", "pass");
mysql_select_db("database",$db);
$result = mysql_query("SELECT * FROM vb",$db); //problem line
if ($myrow = mysql_fetch_array($result)) {
echo "There are records!";
} else {
echo "Sorry, no records were found!";
}
?>




Reply With Quote