me da error
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
| |||
mysql error $saca = mysql_query("SELECT * FROM precio_incumar WHERE id_pr = (SELECT (id) FROM productos_incumar WHERE precioactivado='si' )") or die (mysql_error()); me da error ![]()
__________________ aste nagusia |
| |||
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near SELECT (id) FROM productos_incumar WHERE p .... he probado tb sin el parentesis ![]()
__________________ aste nagusia |
| |||
Creo que esta mal tu sinctaxis, prueba con esto: $sql1="SELECT id FROM productos_incumar WHERE precioactivado='si' "; $resultado1=mysql_query($sql1) or die ("error en $sql1"mysql_error()); while($line=mysql_fetch_array($resultado1)) { $theId=$line['id']; $sql2="SELECT * FROM precio_incumar WHERE id_pr ='$theId' "; mysql_query($sql2) or die ("error en $sql2"mysql_error()); if(mysql_fetch_array==$resultado1) { //aqui van tus variables resultantes } { } espero que te sirva.Saludos!! |