MySQL Query not doing anything?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adamb10
Forum Commoner
Posts: 91
Joined: Sat Jun 24, 2006 7:44 pm

MySQL Query not doing anything?

Post by adamb10 »

Code: Select all

$settings = mysql_query("SELECT * FROM settings WHERE id=1") or die(mysql_error());
$setting = mysql_fetch_array($result);
That line of code I think is wrong. I'm not sure if it's retrieving anything from the database at all as when I use the data retrieved, it doesnt show.

Anyting wrong here?

Thanks!!
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

should be $result = mysql_query(...
adamb10
Forum Commoner
Posts: 91
Joined: Sat Jun 24, 2006 7:44 pm

Post by adamb10 »

How could I not see that? :p

Thanks
Post Reply