-
MySQL Error
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:
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!";
}
?>
What's going wrong?
-
nevermind, I forgot to add the user to the database.