-- A.J. Brown <[email protected]> wrote
(on Tuesday, 14 July 2009, 07:46 PM -0400):
> Am I missing something, or is there no way to implement MySQL's replace in
> Zend_Db using the API?

You're not missing anything -- it's not there, by design.

Zend_Db is a database abstraction layer; the goal of any DBAL is to
provide a common API across all RDBMS engines it supports. REPLACE INTO
is MySQL-specific -- and thus not part of the API.

Now... that said, it may make sense to mimic it across all adapters.
However, I cannot honestly say how that would work, and leave it up to
some industrious DB guru to work out those details if the functionality
is really desired.

In the meantime, you can always extend the Mysql or Pdo_Mysql adapter
and add the functionality in, and then use that adapter instead. Just be
aware when doing so that you lose portability. (I personally will do
development and testing on Sqlite, and then move to MySQL for QA and
production -- and that situation is perfect for a DBAL.)

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to