Unknown column 'var_value?' in 'field list' O_o
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
"n37" <rfernan... @alfadatacenter.com>
Date: Thu, 06 Jul 2006 07:29:08 -0700
Local: Thurs, Jul 6 2006 10:29 am
Subject: Unknown column 'var_value?' in 'field list' O_o
CODE:
$NombreEmpresa = $_POST['NombreEmpresa']; $ActividadEmpresa = $_POST['ActividadEmpresa']; $Direccion = $_POST['Direccion']; $Localidad = $_POST['Localidad']; $Provincia = $_POST['Provincia']; $Cp = $_POST['Cp']; $Telf1 = $_POST['Telf1']; $Telf2 = $_POST['Telf2']; $Fax = $_POST['Fax']; $TelfMovil = $_POST['TelfMovil']; $Url = $_POST['Url']; $Contacto = $_POST['Contacto']; $Cargo = $_POST['Cargo']; $Mail = $_POST['Mail'];
// Primero insertamos la empresa $queryemp = "INSERT INTO DirectoriosNauticos (NombreEmpresa, ActividadEmpresa, Direccion, Cp, Localidad, Provincia, Telf1, Telf2, Fax, Contacto, Cargo, TelfMovil, Mail, Url) VALUES ('$NombreEmpresa', $ActividadEmpresa, '$Direccion', $Cp, $Localidad, $Provincia, $Telf1, $Telf2, $Fax, '$Contacto', '$Cargo', $TelfMovil, '$Mail', '$Url')"; $resultemp = mysql_query($queryemp, $conex) or die(mysql_error());
THE PAGE RETURNS:
Unknown column 'Barcelona' in 'field list'
MY EXPLANATION:
If i comment this 2 vars (like in bottom code), the error changes:
$queryemp = "INSERT INTO DirectoriosNauticos (Localidad, Provincia) VALUES ('$Localidad', '$Provincia')";
It said:
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 'DataCenter' at line 1
Where 'Datacenter' is part of the field $_POST['NombreEmpresa']; and default val is 'LOL DataCenter'...
I'm being crazy or there's a hidden bug? :/
All help is much appreciated. Many thx all.
kthxb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"n37" <rfernan... @alfadatacenter.com>
Date: Thu, 06 Jul 2006 10:10:40 -0700
Local: Thurs, Jul 6 2006 1:10 pm
Subject: Re: Unknown column 'var_value?' in 'field list' O_o
UPDATE:
// variables del formulario $NombreEmpresa = $_POST['NombreEmpresa']; $ActividadEmpresa = $_POST['ActividadEmpresa']; $Direccion = $_POST['Direccion']; $Localidad = $_POST['Localidad']; $Provincia = $_POST['Provincia']; $Cp = $_POST['Cp']; $Telf1 = $_POST['Telf1']; $Telf2 = $_POST['Telf2']; $Fax = $_POST['Fax']; $TelfMovil = $_POST['TelfMovil']; $Url = $_POST['Url']; $Contacto = $_POST['Contacto']; $Cargo = $_POST['Cargo']; $Mail = $_POST['Mail'];
// Primero insertamos la empresa $queryemp = 'INSERT INTO DirectoriosNauticos (NombreEmpresa, ActividadEmpresa, Direccion, Cp, Localidad, Provincia, Telf1, Telf2, Fax, Contacto, Cargo, TelfMovil, Mail, Url) VALUES ("'.$NombreEmpresa.'", '.$ActividadEmpresa.', "'.$Direccion.'", "'.$Cp.'", "'.$Localidad.'", "'.$Provincia.'", "'.$Telf1.'", "'.$Telf2.'", "'.$Fax.'", "'.$Contacto.'", "'.$Cargo.'", "'.$TelfMovil.'", "'.$Mail.'", "'.$Url.'")'; $resultemp = mysql_query($queryemp, $conex) or die(mysql_error());
echo $queryemp . "<br /><br />";
PRINTS:
INSERT INTO DirectoriosNauticos (NombreEmpresa, ActividadEmpresa, Direccion, Cp, Localidad, Provincia, Telf1, Telf2, Fax, Contacto, Cargo, TelfMovil, Mail, Url) VALUES ("Alfa DataCenter", 1, "C\\ loled 3 entlo1", "08025", "Barcelona", "Cataluña", "935672299", "935689299", "934326599", "Raúl Fernández", "CTO", "687512732", "mail", "http://www.alfadatacenter.com ")
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 'DataCenter' at line 1
Any suggestions?
Urgent, thx.
You must
Sign in before you can post messages.
You do not have the permission required to post.