ZF-2088: getLastQueryProfile doesn't show substituted values
Description
When called ->getLastQueryProfile() for an insert or update action in zend_db, the output doesn't show the substituted variables. This limits the usefulness.
For example:
$data = array(
'col1' => 'test',
'col2' => 'test2',
'col3' => 'test3',
);
$db->insert('test_table',$data);
$query=$profiler->getLastQueryProfile();
echo $query->getQuery();
Output is:
INSERT INTO `test_table` (`col1`, `col2`, `col3`) VALUES (?, ?, ?)
Looking at this, there is no way to know what values were sent in the statement
Comments
Posted by Michael Long (phareous) on 2007-10-19T10:38:07.000+0000
It is possible to get the values by using ->getQueryParams()
It would be nice though to have a way of getting the merged SQL string.
Posted by Wil Sinclair (wil) on 2008-03-21T17:05:35.000+0000
This issue should have been fixed for the 1.5 release.
Posted by Wil Sinclair (wil) on 2008-03-25T20:43:58.000+0000
Please categorize/fix as needed.
Posted by Wil Sinclair (wil) on 2008-04-18T13:11:52.000+0000
This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Posted by Wil Sinclair (wil) on 2008-12-04T13:17:31.000+0000
Reassigning to Ralph since he's the new maintainer of Zend_Db