Page 1 of 1

Sql query table starting from variables

Posted: Sat Feb 22, 2014 9:15 pm
by Fabiooo7
Hello Friends
How could perform this query?

Code: Select all

$tipo_festa = $_POST["tipo_festa"];
$sql = "SELECT id_produtos,nome_s,tipo,unid,ref,valor,foto,p150 FROM  $tipo_festa  ";
Queria realizar consultas em uma dela de acordo com o retorno de _post quando eu coloco exe. FROM f_15 a consulta funciona perfeitamente mais quando faço isso FROM $tipo_festa

Thanks to All

Re: Sql query table starting from variables

Posted: Sun Feb 23, 2014 8:05 am
by social_experiment
Fabiooo7 wrote:How could perform this query?
what would you like to do? Your question is fairly vague...