J Kahn wrote:
> UPDATE data SET status='2' AND history='edited' WHERE jobnum='5'
>
> I can't understand why the statment is wrong, can anyone help?
This should be
UPDATE data SET status = '2', history = 'edited' WHERE jobnum = '5';
(note the comma instead of the AND)
Your statement in fact is equivalent to
UPDATE data SET status = ('2' AND history = 'edited') WHERE jobnum = '5';
Which sets
status = 1 when history = 'edited' or
status = 0 when history != 'edited'
(Note: are your status and jobnum CHAR/VARCHAR? If not, don't use the single quotes around the 2 and 5 literals)
--
felix
Please use
BBCode to format your messages in this forum.