Cos I want to do a fairly long-winded process on the records of those who are Age>50 and subsequently update all of their records with the Date/Time that the change took place.SELECT * FROM my_table WHERE Age > 50 AND UPDATE Status = "OLD"No. That's goofy anyway. Why wouldn't you just use a regular UPDATE query?UPDATE mytable Status = "OLD" WHERE Age > 50;
If I do the long-winded process and _then_ do the UPDATE query as you suggest I'm bound to update records which have been added in the meantime (by other clients, it's a busy database) which I've not yet processed.
I could make a list of all primary key values I've processed and then update them... or something equally ugly. I just figured there'd be a cleaner way to do it.
I really want to avoid grabbing all the results as my server is not located on my local machine.
Oh, I could update all the records where age>50 with a known date/time then do my select query to select only those records with that "time-stamp", and then do my long-winded processing.
Can't help thinking there must be a nicer way to do it.
Thanks,
Jeff
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php