Re: opening table 2 inside table1

From: Date: Sat, 25 Sep 2004 02:13:18 +0000
Subject: Re: opening table 2 inside table1
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-197804@lists.php.net to get a copy of this message
Curt, Thanks. > > #mysql_select_db($db2,$myconnection2); #not necessary > > Why isn't this necessary? if you have just opened a connection you > must select a database. Besides the fact that the second connection > isn't necessary. > From what I have experimented with, if I declare $db.$table in my sql, it is no longer necessary: $sql2 = 'select participant,biography,district from '.$db.'.'.$table2.' where district=$mydata1->district'; > > while ($mydata1 = mysql_fetch_object($news)) > > { > > echo "$mydata1->district<br />$mydata1->meeting<br > > />$mydata1->time<br />\n"; > > > > $sql2 = 'select participant,biography,district from > > '.$db.'.'.$table2.' where district=$mydata1->district'; > My error was in the single quotes. > If you need the stylesheet to go along with this see > php-css@lists.php.net :) Thanks. I Will look athtat. John > HTH. Thanks, yes.

« previous php.general (#197804) next »