#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Location
    Rocky Mount, NC
    Posts
    16
    Rep Power
    0

    Getting an error #1064 with an INSERT statement??????


    The statement is

    Code:
    INSERT INTO gtr_shop1_products (categoryID, productCode, productName, listPrice) VALUES (1, ‘tele’, ‘Fender Telecaster’, 599.00);
    From what I can see the statement looks correct. I am getting an error of

    #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 'Telecaster’, 599.00)' at line 1

    Would someone help me understand this? Thank you.
  2. #2
  3. Hockey face
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    St. Catharines, Canada
    Posts
    8,147
    Rep Power
    1316
    try using single quote marks like ' instead of the quotes you are using. they may be getting translated incorrectly.

    Comments on this post

    • paulh1983 agrees : it definitely is that.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Location
    Rocky Mount, NC
    Posts
    16
    Rep Power
    0

    Thanks


    That worked I appreciate it. Thank you.
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,205
    Rep Power
    4279
    yet another mysql developer pwned my microsoft word
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo