Skip to Content.
Sympa Menu

freetds - Re: Problem with Transaction

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Problem with Transaction
  • Date: 12 Nov 2002 07:49:10 -0800

On Tue, 2002-11-12 at 00:57, THF wrote:
> I have MS SQL 6.5 server on Win NT and FreeTDS 0.60 with Apache and PHP. I
> try use transaction but I didnĀ“t work.
> I try this (ex.):
>
> //connect to DB
> mssql_query("BEGIN TRAN",$db);
> $res=mssql_query("select USER_ID from USERS where USER_ID > 10 and USER_ID
> <15);
> while ($rows=mssql_fetch_array($res)){
> mssql_query("delete from USERS where USER_ID = $rows[USER_ID]);
> }
> mssql_query("COMMIT",$db);

In addition to what others have said - I think you need "COMMIT TRAN"
here.

Michael
--
Michael Peppler / mpeppler AT peppler.org / http://www.mbay.net/~mpeppler
mpeppler AT zetatools.com / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.24.

Top of Page