Hola buenas a todos, tengo un problemilla con un código que ando montando y no tengo manera de que funcione siempre me tira este error:
Cita: 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 'Web, descripcionweb=Descripcion Web, keywords=Keywords, alexaverifyid=Alexa ID,' at line 1
aqui os pongo los datos que tengo
Código SQL:
Ver originalCREATE TABLE IF NOT EXISTS `maca_configuracion` (
`idconfiguracion` INT(1) NOT NULL,
`tituloweb` VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL,
`descripcionweb` VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL,
`keywords` VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL,
`alexaverifyid` VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL,
`msvalidate` VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL,
`google` VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL,
`adminemail` VARCHAR(100) CHARACTER SET utf8 DEFAULT NULL,
`personalemail` VARCHAR(100) CHARACTER SET utf8 DEFAULT NULL,
`titulomensajes` VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL,
`semanal` VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL,
`horario` VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL,
`telefono` VARCHAR(20) CHARACTER SET utf8 DEFAULT NULL,
`tiempo` INT(1) DEFAULT NULL
);
Código PHP:
Ver originalexit("UPDATE maca_configuracion SET tituloweb=$tituloweb, descripcionweb=$descripcionweb, keywords=$keywords, alexaverifyid=$alexaverifyid,
msvalidate=$msvalidate ,google=$google, adminemail=$adminemail, personalemail=$personalemail, titulomensajes=$titulomensajes,
semanal=$semanal,
horario=$horario, telefono=$telefono, tiempo=$tiempo WHERE idconfiguracion='$idconfiguracion'");
y aparece se muestra esto
Código SQL:
Ver originalUPDATE maca_configuracion SET
tituloweb=Nombre Web,
descripcionweb=Descripcion Web,
keywords=Keywords,
alexaverifyid=Alexa ID,
msvalidate=Microsoft Id,
google=Google ID,
adminemail=Admin Email,
personalemail=Personale Email,
titulomensajes=Titulos Asunto,
semanal=Trabajo de,
horario=Horario de,
telefono=Teléfono,
tiempo=0
WHERE idconfiguracion='0'
Pero en cuanto pongo esto
Código PHP:
Ver original$result =mysql_query("UPDATE maca_configuracion SET tituloweb=$tituloweb, descripcionweb=$descripcionweb, keywords=$keywords, alexaverifyid=$alexaverifyid,
msvalidate=$msvalidate ,google=$google, adminemail=$adminemail, personalemail=$personalemail, titulomensajes=$titulomensajes,
semanal=$semanal,
horario=$horario, telefono=$telefono, tiempo=$tiempo WHERE idconfiguracion='$idconfiguracion'") or
die(mysql_error());
me tira el 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 'Web, descripcionweb=Descripcion Web, keywords=Keywords, alexaverifyid=Alexa ID,' at line 1
Un saludo y gracias