SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: What am I missing?

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Apr 2011
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What am I missing?

    What am I missing to make this work? When I enter this:

    PHP Code:
    INSERT INTO Comics (ComicNumberComicNameComicTitleComicDateAuthorId)
    VAULES ('875''Detective Comics''Lost Boys''2011-05-01'1
    I get this:

    #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 'VAULES ('875', 'Detective Comics', 'Lost Boys', '2011-05-01', 1)' at line 2
    INSERT INTO Comics( ComicNumber, ComicName, ComicTitle, ComicDate, AuthorId )
    VAULES('875', 'Detective Comics', 'Lost Boys', '2011-05-01', 1)
    Thx in advance!

  2. #2
    Do. Or do not. There is no try silver trophy
    SitePoint Award Recipient ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,347
    Mentioned
    87 Post(s)
    Tagged
    2 Thread(s)
    Read very carefully. You have:

    VAULES

    as opposed to

    VALUES

    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2011
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its the little things in life.. haha

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,539
    Mentioned
    31 Post(s)
    Tagged
    0 Thread(s)
    Rule of thumb:
    #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 'some text here' at line #

    The red word is usually the problem, or you are missing/adding a comma/quote character in front of it.

  5. #5
    SitePoint Member
    Join Date
    Apr 2011
    Location
    UL-2 Shiromani Complex, Ahmedabad
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not exactly the red text shows the problem but MySQL interpreter could not parse the query further due to some previous error or error at that point.


    Regards,
    Hemant
    Last edited by spikeZ; Apr 28, 2011 at 00:55. Reason: sig link removed

  6. #6
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,539
    Mentioned
    31 Post(s)
    Tagged
    0 Thread(s)
    I'm aware of what it means. Most often however, the problem is related to that word, or the space directly before it. Which is what I said.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •