IS NOT NULL not working

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
Da_Elf
Forum Commoner
Posts: 81
Joined: Mon Dec 29, 2008 12:31 pm

IS NOT NULL not working

Post by Da_Elf »

$sqluser = "SELECT * FROM User Where Accepted='1' AND WHERE UserFName IS NOT NULL ORDER BY UserFName ";

Ok. whats wrong with this. i keep getting an error
msurabbott
Forum Commoner
Posts: 33
Joined: Thu Jan 01, 2009 10:18 pm
Location: Chicago, IL, USA

Re: IS NOT NULL not working

Post by msurabbott »

You only need one 'WHERE' clause, your query should look like this:

Code: Select all

$sqluser = "SELECT * FROM User WHERE Accepted='1' AND UserFName IS NOT NULL ORDER BY UserFName ";
Da_Elf
Forum Commoner
Posts: 81
Joined: Mon Dec 29, 2008 12:31 pm

Re: IS NOT NULL not working

Post by Da_Elf »

ah thanks
Post Reply