
Haggai, thats so true...I never noticed that...but tiz true you can't loop thru SQL update statements in code!!! :-D Its so CPU intensive...... Thanx for the Info bulb!! On Wed, Sep 1, 2010 at 12:39 PM, Haggai Nyang <haggai.nyang@gmail.com>wrote:
Let me add to Gregory's explanation...you can save on cpu cycles by making one sql query to update all rows. Instead of a loop on the sql queries you can loop on the array_of_uids variable and create a comma delimited string out of them e.g. in PHP you can easily use the implode function:
$comma_separated = implode(",", $array_of_uids); $sql = "UPDATE products SET product_price = '7.6' WHERE id IN ($comma_separated)";
HTH
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke