Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL



Rick Emery wrote:
Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on Windows and execute stored procedures with output parameters within a transaction? If so, how?

I'm trying to do something like this in the PHP application:

begin transaction
execute a stored procedure, receiving an identity back
if certain conditions are met
execute another stored procedure, getting an identity
if certain other conditions are met
execute another stored procedure, getting an identity
if any of the above procedures fail
rollback transaction
else
commit transaction

Can you do this in mssql (ie take php out of the picture) ?

That is - if you execute a procedure, can you get the identity back?

I have no idea about mssql but that would be my first check..

--
Postgresql & php tutorials
http://www.designmagick.com/
.



Relevant Pages

  • Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL
    ... begin transaction ... execute a stored procedure, receiving an identity back ... The probability that *nobody* from the millions of PHP users and the ...
    (php.general)
  • Stored procs and transactions using Linux/PHP and Windows/MSSQL
    ... Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on Windows and execute stored procedures with output parameters within a transaction? ... execute a stored procedure, receiving an identity back ... I ran into some problems using both PDO and the mssql_* functions (if someone is successful using one of these, I'll likely be asking in a future message for help with the problems I'm encountering). ...
    (php.general)
  • Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL
    ... execute a stored procedure, receiving an identity back ... rollback transaction ... I use the dblib driver. ...
    (php.general)
  • Re: Basic Question Re Quantities
    ... > It would be best to do this in a stored procedure. ... > it is one transaction, so you don't need to worry abvout locking rows, SQL ... declare @qty int ... Then two session can each execute the select, ...
    (microsoft.public.sqlserver.programming)
  • RE: [PHP] Calling a stored procedure
    ... I believe you need to send the call to the stored procedure to the database ... as if it were a query, instead of asking PHP to execute it. ...
    (php.general)