If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > syntax mysql compatablility issue?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-04-04, 22:23
Nigel Nigel is offline
Registered User
 
Join Date: Jul 2004
Posts: 3
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..
Reply With Quote
  #2 (permalink)  
Old 07-04-04, 22:30
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
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 );
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 07-04-04, 22:40
Nigel Nigel is offline
Registered User
 
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);"
Reply With Quote
  #4 (permalink)  
Old 07-04-04, 23:18
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
drop everything after the first semi-colon

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

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 07-04-04, 23:43
Nigel Nigel is offline
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks that seems to have done it....viola!

Nigel
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On