How can I update a record to include the current date?

I tried:
$this->Order->id = $orderID;
$this->Order->save(array('done_date' => 'CURDATE()')

However, CakePHP adds single quotes to CURDATE like so:

      UPDATE `orders` SET `phase1_complete` = 'CURDATE()' WHERE
`order_id` = '6'

The above SQL is wrong because the single quotes around CURDATE()
prevents the query from working.

I read a baker blog at that said to use "-!", but that didn't help
either.

    
http://cakebaker.42dh.com/2007/05/04/how-to-use-sql-functions-in-conditions/#comments

Any ideas on how I can use the MySQL CURDATE() within CakePHP?


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

Reply via email to