Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/03/2010, 09:48
nietecito7
 
Fecha de Ingreso: enero-2008
Mensajes: 34
Antigüedad: 16 años, 3 meses
Puntos: 0
Exclamación ¿Por que me devuelve este error?

Buenas !
Estoy intentando ejecutar una consulta INSERT a Mysql desde PHP de lo mas sencilla, pero no se por que, me devuelve este error:

Column count doesn't match value count at row 1

La tabla tiene lo siguiente:
Tabla PRODUCTS:
CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL default '0',
`nombre` varchar(30) NOT NULL default '',
`info` varchar(20) NOT NULL default '',
`info2` varchar(20) NOT NULL default '',
`year` varchar(20) NOT NULL default '',
`foto` text NOT NULL,
`foto1` text NOT NULL,
`foto2` text NOT NULL,
`foto3` text NOT NULL,
`foto4` text NOT NULL,
`foto5` text NOT NULL,
`foto6` text NOT NULL,
`foto7` text NOT NULL,
`foto8` text NOT NULL,
`foto9` text NOT NULL,
`foto10` text NOT NULL,
`foto11` text NOT NULL,
PRIMARY KEY (`id`)

Y la consulta que realizo:

$id = 34812;
$nombre = "Nueva";
$info = "Es nueva";
$info 2 = "Nueva es";
$year = "2010";
$foto = "jefnn34.jpg";

mysql_query("INSERT INTO products
(id, nombre, info, info2, year, foto)
VALUES('$id', '$nombre', '$info', '$info2', '$year' '$foto') ")
or die(mysql_error());

Gracias de antemano! :D

P.D.: Cuando ejecuta la consulta por SQL en PhpMyAdmin me resalta la palabra: YEAR, ¿Tiene esto algo que ver?