-- Ian Warner <[EMAIL PROTECTED]> wrote
(on Tuesday, 21 August 2007, 05:31 PM +0900):
> I have
>
> $where = array(
> 'user_id = ?' => $user,
> 'video_id = ?' => $this->_getParam('code')
> );
>
> $table->delete($where);
You need a well-formed WHERE clause, not an assoc array of column/value
pairs. Try this:
$adapter = $table->getAdapter();
$where = $adapter->quoteInto('user_id = ?', $user)
. ' AND ' . $adapter->quoteInto('video_id = ?',
$this->_getParam('code'));
$table->delete($where);
> and I am getting the Exception:
>
> Failed: Mysqli prepare error: Unknown column 'M1F94C3359F8FFC35B' in
> 'where clause'
>
> $this->_getParam('code') = M1F94C3359F8FFC35B
>
> I just dont understand why it is using the value of code as a column
> name when it should be using video_id ?
>
> Cheers
>
> Ian
>
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/