Estoy haciendo una funcion que hace una consulta:
Código PHP:
function ver_dat_sql($t,$d,$w,$a){
include('config.ini.adm.php');
$sql="SELECT * FROM ".$t." WHERE ".$d." = '".$w."'";
$query = mysql_query($sql,$conexion) or die(mysql_error());
$data = mysql_fetch_array($query);
if(!empty($data[$a]))
return $data[$a];
else
return "Session vacia.";
}
Cita:
La base de datos existe y la tabla tambien.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 'option WHERE op = 'contactos'' at line 1
Gracias
Salu2
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)