Couldn't figure out what the option "FOR UPDATE" does in a SELECT statement unless it's just to lock the table. Spent the last few hours trying to get subqueries to work only to find that the reason they're not working is not just due to my abominable syntax.
What I'm doing is getting messages from an NNTP server. First, I download all article numbers into a text file and the LOAD DATA FROM INFILE IGNORE into the database which already has article numbers plus headers and bodies. I have found this to be _infinitely_ faster than taking each article number, doing a SELECT to see if it is in the main table, and an INSERT if it is not (we're talkin' light years faster). I thought that if I then create a foreign_key table with LOAD DATA FROM INFILE and just suck in those article numbers, I could just update the main table column (is_expired BOOL) by doing an update with an inner join between the main_table and the foreign_kay table. (Actually setting 'is_expired' to true for all articles and then setting it to false for any article numbers in the foreign_key table. Whew! Sorry that was so long-winded. Anybody figure out what the heck I'm trying to say? And if I may go so far, how I should do this? Thank you, - Zeno --------------------------------------------------------------------- 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