Am 04 Jan 2002 12:49:41 +0100 schrieb Berlina: > Yes, Im thinking the same... > :-(( > > Thanks again Intruder > > > ----- Original Message ----- > From: "Intruder" <[EMAIL PROTECTED]> > To: "Berlina" <[EMAIL PROTECTED]>; "php-general-list" > <[EMAIL PROTECTED]>; "php-dev-list" <[EMAIL PROTECTED]>; > "php-db-list" <[EMAIL PROTECTED]> > Sent: Friday, January 04, 2002 12:38 PM > Subject: RE: [PHP] Sending variables between PHP pages > > > > >> Yes, thanks a lot, but i need to mantain the connection open for manage > a > > >> transaction, an everytime that I open a new database connection, > > >> the system > > >> begins a new transaction and I lose the last one. > > >> Do you understand, me? > > >> Do you know the way for do that? > > > > I think it is imposimble in web applications at all, because there is no > > persistent connection between db server > > and "web server + PHP" service. You can try for example mysql_pconnect() > > function (or it's analog for your db engine) > > but still I don't think it is possible ;((( > > Only applications can make this for you NOT PHP and Web ;(((
I don't see the problem? What do you really want to do? Can't you go and use php sessions to save data generated in multiple pageviews of the web application, and when you finished all data collection from the user, at the last page you go and make your DB transaction to save all the data. If you worry that some data could be changed in the meantime you can even add a timestamp column in your database and check if it's still the same before doing something like, e.g. updating a database row on the last page. So i don't see why a transaction _must_ live over multiple pages and not only start on the last one when input is finished. Anyway, the last sentence is double wrong - you can make _real_ GUI application with php-gtk, see gtk.php.net, and then, i can think of web applications that _could_ do something like that, even if I don't know one that does it - sure you could create a server side, web based software that would let db connections and even transactions alive even after a request and sending out the answer is done(which is the way php, CGI Programs, and i suppose nearly all other Web based software works), save the state of db connections as session data and use the same database connection again with the next request, but i think that brings some problems. E.g. I could fire thousands of programs that stay alive on the server just by sending some http requests - that wouldn't be very nice for folks runnning the webservers. Writing more clearly what the purpose of all that is migth bring me another view of this all... greets, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

