Re: SQL SERVER - Can't apply changes to database

From: Date: Fri, 11 Apr 2003 03:51:14 +0000
Subject: Re: SQL SERVER - Can't apply changes to database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143437@lists.php.net to get a copy of this message
The wierd thing at this behavior is: I've tried exactly the same SQL instrution using Query Analyser (the SQL Client). Instantly my table was updated. It seems when I use through a PHP session it keeps my changes in memory. I have also tried odbc_exec ... and it WORKED.... So, I suppose my problem deals with mssql_query Any ideas? thkx Emerson. -----Mensagem Original----- De: "James Katarski" <j.katarski@ecu.edu.au> Para: <php-general@lists.php.net> Enviada em: Sexta-feira, 11 de Abril de 2003 00:20 Assunto: Re: [PHP] SQL SERVER - Can't apply changes to database > Emerson, > > I would consider echoing the sql statements you are using to your > browser for example. Then, using the exact statements that your code > produces, try them using the SQL client that comes with the DBMS. > > That way you can tell whether your statements themselves work, and what > effect they SHOULD have on the database. > > Cheers, > > James. > > >>> "Emerson Donizeti Batista" <emebatista@microsiga.com.br> 04/11/03 > 11:11AM >>> > I suppose it deals with transaction... or a transaction related to my > session... but I don't know how to commit this data.... I'm gettig > crazy > with it. SQL Profiler registers my instructons with no rollback or > begin > transaction... but... remais the same... no data is saved... > > -----Mensagem Original----- > De: "John W. Holmes" <holmes072000@charter.net> > Para: "'Emerson Donizeti Batista'" <emebatista@microsiga.com.br>; > <php-general@lists.php.net> > Enviada em: Quinta-feira, 10 de Abril de 2003 23:50 > Assunto: RE: [PHP] SQL SERVER - Can't apply changes to database > > > > > I'm using (for test purposes) Windows 98 / Apache 1.3.14 / PHP > 4.3.1 / > > SQL > > > SERVER 7.0 > > > The script below makes a change on the the Northwind Database. This > is > > the > > > sequence: > > > > > > 1 - UPDATE Employees table > > > 2 - SELECT Employees table > > > 3- SHOW the results > > > > > > When I run the script, the SELECT part shows that my update was > ok. > > > But If I call the php script again, my changes were not saved. If > I > > use > > > query analyzer, I make changes normally. The SQL Profiler > registers > > the > > > instructions... but no change is applied to my database. > > > > Is it maybe some transaction issue? Like the change is not committed, > so > > it's not actually kept once the script ends? I'm grasping at straws > > here... :) > > > > ---John W. Holmes... > > > > PHP Architect - A monthly magazine for PHP Professionals. Get your > copy > > today. http://www.phparch.com/ > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#143437) next »