Page 1 of 1

Error Messages

Posted: Sat May 16, 2009 5:31 pm
by sleepydad
I have signed up with a host that assures me that they are using MySQLi databases and PHP 5.x. My previous host, according to prior posts that I've put in this forum, apparently didn't support either of these. Anyway, I've created a database and uploaded my PHP which tests fine locally on my Mac using MAMP. When I try to access it with this new host on the www, I get the following error messages:

Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in /home/kaseberg/public_html/players.php on line 54

Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in /home/kaseberg/public_html/players.php on line 84

Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in /home/kaseberg/public_html/players.php on line 101

Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in /home/kaseberg/public_html/players.php on line 113

Warning: mysqli::close() [mysqli.close]: Couldn't fetch mysqli in /home/kaseberg/public_html/players.php on line 125

When I view these line numbers in Dreamweaver, all are the same:

Code: Select all

$result=$db->query($query);
I'm using the following to connect to my db:

Code: Select all

@ $db=new mysqli('host', 'uname', 'pass', 'dbName');
** I've omitted my real info here for privacy **

What gives. I'm running out of hair to pull!

Thanks in advance -
sleepydad

Re: Error Messages

Posted: Sat May 16, 2009 5:46 pm
by Darhazer
Remove the @ before the "new mysqli" statement. May be there is an error in the connection and you are suspending that error.

Re: Error Messages

Posted: Sat May 16, 2009 6:05 pm
by sleepydad
I removed the "@" and it's working now! I'm not sure why that would be, but I'm back in business.

Thanks!