Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.