![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
04/04/2008, 13:45
|
![Avatar de agressor](http://static.forosdelweb.com/customavatars/avatar203215_1.gif) | | | Fecha de Ingreso: noviembre-2007 Ubicación: Knocking the Death Door..
Mensajes: 368
Antigüedad: 17 años, 2 meses Puntos: 3 | |
Re: Variable dentro del query Cita:
Iniciado por agressor Disculpame me equivoque.. Código PHP: $conexion = mysql_connect('localhost','prueba','root','password'); mysql_select_db('prueba', $conexion);
if (!@mysql_select_db('prueba')) { exit('<p>Unable to locate the joke ' . 'database at this time.</p>'); } prueba hacer un echo aqui..
echo $tabla;
if (mysql_select_db('prueba')) { sql="select * from '$tabla' where campo='$variable'"; }
Esto te deberia servir..
Y mis disculpas..
Tambien prueba dandole un echo '$tabla' al valor de las variables antes de realizar el SQL..
Salu2..!
__________________ Somos lo que nosotros queremos ni mas ni menos..
No hay dia mas perdido que aquel en que no hemos reido..
La vida es tal y como debe ser...
Nadie vivira por ti... |