Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.0
-
Fix Version/s: 1.7.0
-
Component/s: Zend_Db_Table
-
Labels:None
-
Fix Version Priority:Should Have
Description
Using SQL Server 2000, and Zend_Db_Adapter_Pdo_Mssql
Here's the application code:
try { //$email_requests_table is an instance of a Zend_Db_Table_Abstract extension $new = $email_requests_table->createRow(array( 'oc_id' => $input['oc_id'][$i], 'EmailAddress' => $input['EmailAddress'], 'PersonName' => $input['PersonName'], )); $new->save(); } catch(Zend_Db_Table_Row_Exception $e) { header("content-type: text/plain"); die(print_r($new, true) . "\n" . print_r($e, true)); }
Using a SQL Profiler I was able to apprehend that the correct insert is performed, but during _refresh() the following invalid query is sent:
SELECT "vp_Email_Requests".* FROM "vp_Email_Requests" WHERE ("TblPK" = 181) SELECT * FROM (SELECT TOP 1 * FROM () AS inner_tbl) AS outer_tbl
Which is sending an error back "Incorrect syntax near ')'" (highlighted in red)
I'm certain my application code is right, because I've done similar tasks using a MySQL adapter. I'm thinking this is a Mssql adapter related bug.
This is what $email_requests_table is an instance of