Can anyone explain why this query is run twice?  Debug shows the sql
for this query only once, but in the database the price is increased
two times.

//code in model
$delta=1; $currentprice=10;
$this->execute("UPDATE ". $this->table." SET
products_price=products_price". "+$delta WHERE
products_price".">=$currentprice");
pr("UPDATE ". $this->table." SET products_price=products_price".
"+$delta WHERE products_price".">=$currentprice");
//end of code in model



Is there a better way to write this query?
UPDATE products SET products_price=products_price+1 WHERE
products_price>=10


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to