Trouble with MySQL command in script
Posted by Chris_Isaac (Chris Isaac), 20 February 2005Hi
I've got the following command which isn't quite working:
The bit thats causing the problem is the Quote:
Incidently 'active' is an int field, some are set to 1, 2, or 3. But its the majority which are still null which I want to grab. I've also tried a few different options like Quote:
Any pointer greatly appreciated.
Posted by admin (Graham Ellis), 20 February 2005I'm guessing it might relate to the NULL. NULL is not normally a value that you write in quotes, but a condition, so typically:
Incorrect: active = "NULL"
correct: active IS NULL
Suggestion - try your query and perfect it through the mysql client program and then put it into your program. At the very least this will tell you if you have an SQL or PHP issue.
Posted by Chris_Isaac (Chris Isaac), 20 February 2005Perfect, thats fixed it.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho