Jump to content

[SOLVED] Very Simple INSERT query


herghost

Recommended Posts

Hi All,

 

I am trying to do something that I thought would be simple, but now I just cant work it out!

 

I have a table and with a coloum 'name' and I am simply trying to add data into the 'name' filled while leaving the other fields blank.

 

I have tried this, which I thought would do it:

 

INSERT INTO class_categories (`name`)
VALUES ('AC',
'AIXAM',
'ALFA ROMEO',
'ASCARI',
'ASIA',
'ASTON MARTIN',
'AUBURN',
'AUDI',
'AUSTIN',
'BELSIZE',
'BENTLEY',
'BITTER',
'BMW','BRISTOL','BUGATTI','BUICK','CADILLAC','CATERHAM','CHEVROLET','CHRYSLER','CITROEN','COLEMAN MILNE','CORVETTE','DAEWOO','DAIHATSU','DAIMLER','DATSUN','DAX','DE TOMASO','DODGE','EXCALIBUR','FERRARI','FIAT','FORD','GINETTA','GMC','HILLMAN','HOLDEN','HONDA','HUMMER','HYUNDAI','INFINITI','ISUZU','JAGUAR','JEEP','JENSEN','KIA','KOENIGSEGG','LADA','LAMBORGHINI','LANCIA','LAND ROVER','LEXUS','LIGIER','LINCOLN','LOTUS','LTI','MARCOS','MARLIN','MASERATI','MAYBACH','MAZDA','MCLAREN','MERCEDES-BENZ','MERCURY','MG','MICROCAR','MINI','MITSUBISHI','MITSUOKA','MORGAN','MORRIS','NAYLOR','NISSAN','NOBLE','OPEL','PAGANI','PANTHER','PERODUA','PEUGEOT','PGO','PILGRIM','PLYMOUTH','PONTIAC','PORSCHE','PROTON','QUANTUM','RADICAL','RELIANT','RENAULT','ROLLS-ROYCE','ROVER','SAAB','SEAT','SEBRING','SKODA','SMART','SSANGYONG','SUBARU','SUNBEAM','SUZUKI','TALBOT','TATA','TD CARS','TIGER','TOYOTA','TRIUMPH','TVR','ULTIMA','VAUXHALL','VENTURI','VOLKSWAGEN','VOLVO','WESTFIELD','WOLSELEY')

 

but I just get the error '#1136 - Column count doesn't match value count at row 1 ' There are 115 enteries to I tried creating the 115 rows and then using the REPLACE into command but got the same thing.

 

Any pointers would be welcome :)

Link to comment
https://forums.phpfreaks.com/topic/139197-solved-very-simple-insert-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.