On Fri, Apr 26, 2002 at 10:20:41PM +0100, Mike Hall wrote:
> SELECT MailID, MailBody, MailHeaders FROM Mail WHERE Sent = 0;
> UPDATE Mail SET Sent = 1 WHERE MailID = [whatever];
[..snip..]
> As I said, this script runs every five minutes - which means this query has
> been ran around 83,000 times during the lifetime of my site. 82,998 times it
> executed without any problems. Twice it has appeared to ignore my WHERE
> clause. I really am at a loss about why this is happening - does anyone have
> any ideas?
Is there any chance at all that a field name is appearing in your
WHERE clause? For example:
UPDATE foo SET flag = 0 WHERE foo_id = foo_id;
foo_id = foo_id of course matches all.
Not much room for that kind of error in this example, but
perhaps in other scripts that deal with the table in question?
--
Michael Bacarella | Netgraft Corporation
| 545 Eighth Ave #401
Systems Analysis | New York, NY 10018
Technical Support | 212 946-1038 | 917 670-6982
Managed Services | [EMAIL PROTECTED]
---------------------------------------------------------------------
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