
April 2nd, 2003, 08:19 AM
|
|
|
|
Join Date: Apr 2007
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
MsSQL Transaction Isolation Levels and Commits
CRITERIA: WIN2K SERVER, MSSQL 2000, PHP4.
Question:
I am creating a PHP application that will allow the manipulation of data in an MSSQL 2000 DB. I have the general functions up and running - search, add, modify, delete and list of records. I am now faced with setting transactions and record locking. I have no idea how to implement a set_transaction as MSSQL PHP functions does not seem to support it even though MSSQL 2000 allows and supports transactions. Does anybody know a work around for this?
Any help would be much appreciated.
Here is my code so far:
$sql = "SELECT * FROM TABLE order by COLUMN asc ";
$sql_trans = mssql_query("SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;");
$sql_result = mssql_query($sql) or die("Couldn't execute query.");
$num = @mssql_num_rows($sql_result);
$row = @mssql_fetch_array($sql_result);
$trans_end ="COMMIT TRANSACTION";
Many Thanks In Advance
|