Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/07/2011, 15:16
kozenko
 
Fecha de Ingreso: octubre-2010
Mensajes: 83
Antigüedad: 13 años, 6 meses
Puntos: 1
Problema con query

Hola!
Tengo el siguiente query:
Código PHP:
mysql_connect($bd['host'], $bd['user'], $bd['pass']);
                        
mysql_select_db($bd['base']);
                    
$sql "INSERT INTO `imgs`
                                        (`nombre_img`,`ruta_completa,`subidor`,`dia`)
                                        VALUES
                                        ('"
.$prefijo."_".$archivo."','".$destino."','".$_SESSION['user']."','".date("m.d.y.H.i.s")."')";
                        
$res mysql_query($sql) or die(mysql_error()); 
y me da el siguiente error:

Código:
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 'subidor`,`dia`) VALUES ('716147_trollscience.png','716147_trollscien' at line 2
Es un subidor de imagenes.

Espero que me puedan ayudar.

Gracias,
Kozenko!