SimonSellick
Programmer
Hi,
I've moved this to here from the SQL Server forum.
I'm submitting a complex series of updates as a T-SQL block from a PHP script. The return does not show an error but it also does not return a row as expected and has not updated the database. If I submit a simpler block it works as expected. If I catch the complex block text and paste it into QA it runs correctly and returns the expected row.
One difference between the simple and complex blocks is that I have a begin transaction / commit / rollback in the complex one. If I remove it, the database gets updated but the call still returns nothing (and I need the rollback facility).
Is there a preferred way to submit an executable T-SQL block, or am I correct in using the mssql_query function?
Any pointers would be appreciated.
Simon
I've moved this to here from the SQL Server forum.
I'm submitting a complex series of updates as a T-SQL block from a PHP script. The return does not show an error but it also does not return a row as expected and has not updated the database. If I submit a simpler block it works as expected. If I catch the complex block text and paste it into QA it runs correctly and returns the expected row.
One difference between the simple and complex blocks is that I have a begin transaction / commit / rollback in the complex one. If I remove it, the database gets updated but the call still returns nothing (and I need the rollback facility).
Is there a preferred way to submit an executable T-SQL block, or am I correct in using the mssql_query function?
Any pointers would be appreciated.
Simon