Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/09/2009, 17:38
Avatar de Joni2Back
Joni2Back
 
Fecha de Ingreso: marzo-2009
Mensajes: 146
Antigüedad: 15 años, 1 mes
Puntos: 1
No me reconoce array en Query

Hola amigos como andan??

Estoy con un problema hace ya unas horas y sigo sin resolverlo...
Estoy haciendo un insert al estilo update (con set), el tema es que me sale el siguiente error:

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 'set `id_user`=, `id_ticket`=, `fecha`=, `hora`=, `mail_op`=, `mensaj' at line 1

Código PHP:
$query_tickets_insertar="
INSERT INTO "
.$config['tabla_tickets_users']." set 
`id_user`="
.$g_id_user.", 
`id_ticket`="
.$g_id_ticket.", 
`fecha`="
.$g_fecha.", 
`hora`="
.$g_hora.", 
`mail_op`="
.$g_mail_op.", 
`mensaje`="
.$g_mensaje
tambien probe de esta forma pero el problema sigue..
Código PHP:
$query_tickets_insertar="
INSERT INTO "
.$config['tabla_tickets_users']." set 
`id_user`='$g_id_user', 
`id_ticket`='$g_id_ticket', 
`fecha`='$g_fecha' , 
`hora`='$g_hora' , 
`mail_op`='$g_mail_op',
`mensaje`='$g_mensaje'
"

y tambien probe la forma comun, pero nada resulta...
Código PHP:
$query_tickets_insertar="INSERT INTO ".$config['tabla_tickets_users'].
(id_user, id_ticket, fecha, hora, mail_op, mensaje) VALUES 
($g_id_user, $g_id_ticket,$g_fecha, $g_hora, $g_mail_op, $g_mensaje)"

En algunas ocaciones pude solucionarlo, pero no me reconocia el array ($config['tabla_tickets_users'])

Última edición por Joni2Back; 17/09/2009 a las 18:09