Hejsa alle sammen.
Jeg har noget, jeg tror er en simpel fejl, men jeg kan bare ikke finde den.
et udpluk af mit script:
$insertQuery = "INSERT INTO clients (company,vatnumber,firstname,lastname,adress1,adress2,zipcode,city,phone,email,website,group) VALUES (".
"'".$HTTP_POST_VARS['company']."', ".
"'".$HTTP_POST_VARS['vatnumber']."', ".
"'".$HTTP_POST_VARS['firstname']."', ".
"'".$HTTP_POST_VARS['lastname']."', ".
"'".$HTTP_POST_VARS['adress1']."', ".
"'".$HTTP_POST_VARS['adress2']."', ".
"'".$HTTP_POST_VARS['zipcode']."', ".
"'".$HTTP_POST_VARS['city']."', ".
"'".$HTTP_POST_VARS['phone']."', ".
"'".$HTTP_POST_VARS['email']."', ".
"'".$HTTP_POST_VARS['website']."', ".
"'".$HTTP_POST_VARS['group'].")";
Fejlen:
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 'group) VALUES ('STEREO:TYPE', '3)' at line 1
Og min MySQL tabel:
CREATE TABLE `clients` (
`ID` int(4) NOT NULL auto_increment COMMENT 'The unique ID of the record.',
`company` varchar(50) NOT NULL,
`vatnumber` varchar(50) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`adress1` varchar(50) NOT NULL,
`adress2` varchar(50) NOT NULL,
`zipcode` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`phone` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`website` varchar(100) NOT NULL,
`group` int(11) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
Kan i se fejlen??