Jump to content

help with this insert


CyberShot

Recommended Posts

can you tell me what is wrong with this. When I try to import it into a table, I get this error

 

SQL query:

 

--

-- Dumping data for table `bike`

--

INSERT INTO bike( 'pk_bikeID', 'model', 'year', 'size', 'rate', 'quantity' )

VALUES ( 1, 'road', '2009', '40', '15', '40' ) , ( 2, 'mountain bike', '2009', '30', '15', '20' ) , ( 3, 'dirt bike', '2010', '10', '15', '30' ) ;

 

 

 

MySQL said: 

 

#1064 - 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 ''pk_bikeID','model','year','size','rate','quantity') VALUES

(1,'road','2009','4' at line 3

 

I am importing the sql file, very short. I have attached the file for convienence

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/182974-help-with-this-insert/
Share on other sites

ok that worked, but now I am getting another error that says unknown column

 

SQL query:

 

--

-- Database: `bikesite`

--

-- --------------------------------------------------------

--

-- Table structure for table `bike`

--

--

-- Dumping data for table `bike`

--

INSERT INTO bike( `pk_bikeID` , `model` , `year` , `size` , `rate` , `quantity` )

VALUES ( 1, `road` , `2009` , `40` , `15` , `40` ) , ( 2, `mountain bike` , `2009` , `30` , `15` , `20` ) , ( 3, `dirt bike` , `2010` , `10` , `15` , `30` ) ;

 

 

 

MySQL said: 

 

#1054 - Unknown column 'road' in 'field list'

 

 

I  matched them up and don't see what the issue is

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.