Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    3

    Unanswered: syntax mysql compatablility issue?

    Hi, I am trying to install a 3rd party chat module onto an online content system..... Here is the error I get....


    Database error: _SPCHAT_INSERTINTOTABLEFAILED
    SQL error: "You have an error in your SQL syntax near '5,0)' at line 6" SQL query: "INSERT INTO nuke_spchat_grpmember ( nuke_spchat_grpmember.uid, nuke_spchat_grpmember.gid, nuke_spchat_grpmember.rid) VALUES (,5,0);"


    Mysql version is 3.23.58

    Thanks for your time..... I am not a programmer its all swahili to me..

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    VALUES (,5,0) has nothing between the opening parenthesis and the first comma

    that's the syntax error

    if uid is an auto_increment, you can try this:

    INSERT INTO nuke_spchat_grpmember ( gid, rid ) VALUES ( 5, 0 );
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2004
    Posts
    3
    hmm... I don't think I did that right....


    query looks like this

    "INSERT INTO nuke_spchat_grpmember( gid, rid ) VALUES ( 5, 0 ); ( nuke_spchat_grpmember.uid, nuke_spchat_grpmember.gid, nuke_spchat_grpmember.rid) VALUES (,5,0);"

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    drop everything after the first semi-colon

    INSERT INTO nuke_spchat_grpmember( gid, rid ) VALUES ( 5, 0 );

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jul 2004
    Posts
    3
    Thanks that seems to have done it....viola!

    Nigel

Posting Permissions

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