You can do it in one line of code, I just wrote it as three lines to be
clear.
$where[] = $db->quoteInto('col1 = ?', 123);
$where[] = $db->quoteInto('col2 = ?', 456);
$db->update('mytable', $data, $where);
Can also be written as:
$db->update('mytable', $data, array(
$db->quoteInto('col1 = ?', 123),
$db->quoteInto('col2 = ?', 456)
));
Although I don't consider it mandatory always to force any given task
into one line of code.
After all, the semicolon is there to be used. :)
Regards,
Bill Karwin
> -----Original Message-----
> From: Mike Fern [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 22, 2007 8:57 AM
> To: [email protected]
> Subject: Re: [fw-general]
> Zend_Db_Adapter_Abstract::quoteInto, accepting multiple question marks
>
> Hi Bill,
> Eval might be not good, but it's there to be used :)
>
> Your response seems valid and logical. Though it will add
> some additional rows, it could be a nice tweaked solution for
> this case.
>
> Thanks for your comment.
>
> Regards,
> Mike
>