MySQL errors


#1

Got the first problem fixed, now I’m not sure what these errors mean or how to fix them: http://anygift4free.com

Any help is appreciated guys! :slight_smile:


#2

Can you post the lines before the first set of errors in config.php? Minus password information of course :stuck_out_tongue:


#3

Here’s the whole config.php file (edited):

<? // license key $serial = "***"; $serial2 = "***"; // MySQL configuration $db_host = "***.anygift4free.com"; // host $db_username = "***"; // username $db_password = "***"; // password $db_name = "***"; // dbname // connect to MySQL $conn = mysql_connect($db_host,$db_username,$db_password); $db = mysql_select_db($db_name); // site configuration (general info about the site) $sitename = "Any Gift 4 Free"; $siteslogan = "Free items, no catch!"; $siteurl = "http://anygift4free.com"; $normaltd = "#EFEFEF"; $movertd = "#EAEAEA"; // admin configuration (admin user, more may be added later) $adminuserid = "1"; $adminusername = "***"; // something random is the best $adminpassword = "***"; // something random is the best $adminemail = "admin@anygift4free.com"; // email configuration $emailaddress = "admin@anygift4free.com"; // email address the From: field will show in the signup email $emailsubject = "Welcome to $sitename"; // subject of the email // message of the email. use \n for a new line $emailmessage = "Congratulations on your registration at $sitename!\n Please keep your account information in a safe place.\n\nUsername: $username\nPassword: $password\n\nThanks,\n$sitename\n$siteurl"; // do not modify below this if(isset($install)) { echo ""; } else { $numusers = mysql_query("select * from users"); $num = mysql_num_rows($numusers); $numoffers = mysql_query("select * from offers"); $num2 = mysql_num_rows($numoffers); $numrewards = mysql_query("select * from rewards"); $num3 = mysql_num_rows($numrewards); $numorders = mysql_query("select * from orders"); $num4 = mysql_num_rows($numorders); } ?>

#4

Everything seems ok… I am guessing the connection is fine since there are no errors being displayed (or surpressed).
Is there a table called that? there isn’t a prefix to the table name (forum_users or something?)?

Try changing line 39 to
$numusers = mysql_query(“select * from users”, $conn);
or
$numusers = mysql_query(“select * from users”, $db);

and see if that gets rid of an error message.