REPLACE is a MySQL-proprietary extension to SQL.  It is not supported in
Zend_Db.

In any case, I recommend strongly against using REPLACE.  It is really
problematic when using foreign key constraints, for example.

A better choice is INSERT... ON DUPLICATE KEY UPDATE which correctly
performs the insert/update as an atomic action.
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

But this also has no direct support in Zend_Db_Table, so you'll have to
do the query yourself.

Regards,
Bill Karwin 

> -----Original Message-----
> From: Ian Warner [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, September 09, 2007 1:31 AM
> To: Zend Framework
> Subject: [fw-general] DB Table -Replace
> 
> Hi
> 
> I cant see any documentation on how to acheive a REPLACE 
> command within DB TABLE
> 
> is this possible and if so what is the best practice
> 
> Ian
> 

Reply via email to