snoopy13,
Sorry to hijack your thread to say sorry if you mail me your code and I will send back the SQL you require.
Anyway...
My host is still using MySQL v3.? and I am having to do a DB cleansing script a bit like snoopy here except across 20 tables. My question is which way is best (ie most efficient)
I would have thought that the following would be very inefficient with so many network/DB calls.
$array['key'] = 'value';
while(@list($key, $val)=@each($array)) {
mysql_query("DELETE …");
}
OR
while(@list($key, $val)=@each($array)) {
in_list .= $key || ',';
}
mysql_query("DELETE … WHERE key IN (" . $in_list .")");
(yes I know and remove the final ,) I expect this to be quicker except this must have limitations.
FINALY MY QUESTION: -
What is the max number of entries and at what point will this become inefficient.
TA
Simon.