Re: mysql_query: how to uniquely identify the query???

From: Date: Tue, 05 Mar 2002 21:15:20 +0000
Subject: Re: mysql_query: how to uniquely identify the query???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87352@lists.php.net to get a copy of this message
Simon, You can use the same name for your result as in: $query="SELECT * FROM table_name WHERE id='$variable'"; $result=mysql_query($query); $array1=mysql_fetch_array($result); $query=SELECT * FROM table_name WHERE name='$variable2'"; $result=mysql_query($query); $array2=mysql_fetch_array($result); But use different names for your final results. They're in a form recognized by your php code and will exist for as long as your page exists. Hope this helps, Hugh ----- Original Message ----- From: "Simon De Deyne" <Simon.DeDeyne@psy.kuleuven.ac.be> To: <php-general@lists.php.net> Sent: Tuesday, March 05, 2002 5:30 AM Subject: [PHP] mysql_query: how to uniquely identify the query??? > Hi, > I'm a bit a newbie at the mysql-php tandem, > but I wanted to ask a pretty basic question > > Supose you do > x=mysql_query(/somequery/) > // fetch a row > > and then later you do > > y=mysql_query(/somequery/) > > If you want to fetch the following row for the query in x, > you should probably make the distinction with the query in y,... > how do you do this? Can you give an example? > How does this relate to "resource link_identifier"? > Does it? > > sorry if this might be a bit trivial, but i'm a little stuck, > > Simon > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#87352) next »