Re: How to execute multiples querys

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

 



Mauricio Pellegrini a écrit :
$quer1 = "SET @var1=3 ;
	SELECt * from table1 Where col1=@var1 " ;


This gave a syntax error from MySQL inmmediately before the ";"
(semicolon),

did you try to run the query above

( SET @var1=3 ; SELECt * from table1 Where col1=@var1 )

directly from a mysql client ?
perhaps the @ is interpreted and you have to put a \ before it.
try a print $quer1 once $quer1 is set.
Please any help greatefully appreciated

Thanks Mauricio


Yes, I need to do it exactly this way.
I mean , SET the value for the variable @var1 first.
Then execute an undefined number of querys that reference this variable
and its value.

Thanks Mauricio


--
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