Re: How to execute multiples querys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-04-26 at 11:04, chris smith wrote:
> On 4/26/06, Mauricio Pellegrini <hrrg-inf@xxxxxxxxxxxxx> wrote:
> > On Wed, 2006-04-26 at 10:32, nicolas figaro wrote:
> > > Mauricio Pellegrini a écrit :
> > > > Hi all
> > > >
> > > > I'm trying to execute two querys and they execute perfectly in fact,
> > > > but after the execution of the first query there suposed to be some
> > > > variable setted to a certain value.
> > > >
> > > > The problem is this variable is not available at the time the second
> > > > query runs.
> > > >
> > > > I`ll try to explain a little bit further
> > > >
> > > > //This is my first query
> > > >
> > > > $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for var1 to 3
> > > > mysql_query($quer1);
> > > >
> > > > // This is query #2
> > > >
> > > > $query2="SELECT * from table1 where col1=@var1 "//Here @var1 doesn`t
> > > > exist
> 
> If you try this through a mysql console or through something like
> phpmyadmin does it work?
> 

Yes, it works.

> --
> Postgresql & php tutorials
> http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux