Re: Updating 2 Databases from a single form

From: Date: Thu, 27 Sep 2007 23:46:32 +0000
Subject: Re: Updating 2 Databases from a single form
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-44077@lists.php.net to get a copy of this message
On 9/27/07, Derek <dmoon3@depaul.edu> wrote: > Hello, > > I was wondering if there is anyway to first connect to two databases > simeltaneously. (both reside on the same server) . After connecting, I have > a single form that I want to use to update data to 2 different tables, both > tables are in different databases. > > So far I have recieved at least 10 ways of doing this and none of them seem > to work. > I know there is a way, but I cant seem to grasp it from the information that > I have acquired so far. > > Important Facts > Both databases have the same login credentials, > Both databases are on the same server, > > > Any ideas? > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > mysql_connect($server, $user, $pass); mysql_select_db($db1); mysql_query($query1); mysql_select_db($db2); mysql_query($query2);

« previous php.db (#44077) next »