mysql_fetch_array(): supplied argument is not a valid MySQL result
This code on one site works:
PHP Code:
$db = mysql_connect( "localhost", "$dbusername", "$dbpassword") or die( "Unable to connect to server!");
mysql_select_db("$db_name",$db);
$blurb = mysql_query("SELECT date,id,author,blurb FROM blurbs ORDER by id DESC limit 0,1",$db);
while ($myrowb = mysql_fetch_array($blurb)) {
//do looping code here
PHP Code:
$db = mysql_connect( "localhost", "$dbusername", "$dbpassword") or die( "Unable to connect to server!");
mysql_select_db("$db_name",$db) or die ("unable to connect");
$blurb = mysql_query("SELECT date,id,title,update,author FROM updates ORDER by id DESC limit 0,10",$db);
while ($myrowb = mysql_fetch_array($blurb)) {
// looping code here