My script needs to run through lots of rows, analyze content, and then make updates on them (selectively)
Obviously I have a loop to evaluate each row...
I normally would issue an SQL UPDATE query within this loop (for the current row being evaluated) ... Infact I like this better, more straight cleaner for my code etc. $q = "UPDATE mytable SET status='online' WHERE id='22'";
But lately i've been using "IN" clauses.. the loop would gather the ids in csv and then later do;
if ids exist do query
$q = "UPDATE mytable SET status='online' WHERE id IN(22,25,147)";
So is either of the 2 techniques SIGNIFICANTLY BETTER? in reality? or might i as well stick w/ where im comfortable with...
and yes, for code and other tasks i have to do, it's easier to have the individual UPDATE SQLs fire inside the loop...