[PHP-DB] NULL VALUE

2005-01-03 Thread Perry, Matthew (Fire Marshal's Office)
My status column in my Employee table should have two values Active and Inactive. Right now all the active employees have the value Active and the rest have a NULL value. Why is it that the following commands do nothing? UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS != 'Active'; UPDATE

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
first off it would help if you specified what DB you are using and if you are using a DB abstraction lib like PEAR::DB or something similar. also have you tried running these lines directly in a cmdline sql client? is the status column variable width? if not then the value may be 'Active '

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Bastien Koert
for Inactive) Bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] NULL VALUE Date: Mon, 3 Jan 2005 11:40:52 -0600 My status column in my Employee table should have two values Active and Inactive. Right now all the active employees have

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:16 PM Subject: Re: [PHP-DB] NULL VALUE LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells me STATUS is a keyword. try either renaming your field or using backticks

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:16 PM Subject: Re: [PHP-DB] NULL VALUE LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells me STATUS is a keyword. try either renaming your field

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Perry, Matthew (Fire Marshal's Office)
: Monday, January 03, 2005 2:16 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] NULL VALUE Norland, Martin wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:16 PM Subject: Re: [PHP-DB] NULL VALUE LightBulbMoment (tm): 5 seconds

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
Hi Matthew, there are some more comments below but just for the record could you confirm that you are retrieving one or more rows when you issue the following SQL: SELECT * FROM `employee` WHERE `status` IS NULL; if you are getting no rows back then the obviously updating based on the status