Hi,
I experienced a quoting issue within Zend_Db_Table when specifying the given
value type:
// Code:
$db = Zend_Db::factory('Pdo_Mysql', array(
'host' => '...',
'username' => '...',
'password' => '...',
'dbname' => '...'
));
Zend_Db_Table::setDefaultAdapter($db);
unset($db);
$table = new Zend_Db_Table(array('name' => 'myTable'));
$select = $table->select();
$select->where('field1 = ?', 'foo');
$select->where('field2 = ?', 'foo', Zend_Db::PARAM_STR);
die($select);
// Output:
SELECT `myTable`.* FROM `myTable` WHERE (field1 = 'foo') AND (field2 =
0.000000)
// Expecting:
SELECT `myTable`.* FROM `myTable` WHERE (field1 = 'foo') AND (field2 =
'foo')
Am I doing something wrong or can someone confirm that problem?
P.s.:
Tested against Zend Framework v1.10.3, PHP v5.2.12.
--
Regards,
Thomas