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 fi

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Perry, Matthew (Fire Marshal's Office)
topic and will continue researching other sources. Once again I apologize for the original posting. It was meant to go to one of my associates (who also does not know the answer!). - Matthew -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, J

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 or

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 renamin

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Bastien Koert
I have a feeling that 'Status' field may be the problem. The word Status is used by MySQL for other sql commands. Either place the fieldname in backticks (the key under the ESC key) like so: UPDATE `EMPLOYEE` SET `STATUS`='Inactive' where `STATUS` != 'Active'; or change the fieldname to emp_stat

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 ' (num