From: Operating system: Ubuntu PHP version: 5.3.2 Package: MSSQL related Bug Type: Bug Bug description:mssql_query "Query Processor Error"
Description: ------------ I generate a SQL statement dynamically in PHP script. When I execute this SQL query, the system crash with error "Query Processor Error: The query processor could not produce a query plan". If I execute the same query directly on SQL server, it works. The SQL string is: $sql = "BEGIN TRY BEGIN TRANSACTION DELETE FROM EEES_AprenAssigPE WHERE IdAssig like '200166' AND Curs=2009; INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01', '200166', 'C2', 2009); INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01', '200166', 'E23', 2009); INSERT INTO EEES_AprenAssigPE (IdPlaEst, IdAssig, CodiRes, Curs) VALUES ('GEL01', '200166', 'E23.7', 2009); SELECT 1 AS OK; COMMIT TRANSACTION; END TRY BEGIN CATCH SELECT -1 AS OK; ROLLBACK TRANSACTION; END CATCH"; -- Edit bug report at http://bugs.php.net/bug.php?id=51964&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51964&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51964&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=51964&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=51964&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51964&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51964&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51964&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51964&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51964&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51964&r=support Expected behavior: http://bugs.php.net/fix.php?id=51964&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51964&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51964&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51964&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51964&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51964&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51964&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51964&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51964&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51964&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51964&r=mysqlcfg