Reecey12345 Posted March 21, 2014 Posted March 21, 2014 Hey guys, ive been trying to eventadd to my rating modification. This is the line im using. event_add($r['userid'],"<a href='viewuser.php?u=$userid'>{$ir['username']}</a> rated you down."); This is my error. QUERY ERROR: 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 'UNIX_TIMESTAMP(),0,'Reece rated you down.'' at line 1 Query was INSERT INTO events VALUES('',,UNIX_TIMESTAMP(),0,'Reece rated you down.') Some help with this will be appreciated, i've been tweaking it for the past half hour and no luck Quote
W3Theory || Peter Posted March 21, 2014 Posted March 21, 2014 (edited) Never mind can't really read on this phone. Edited March 21, 2014 by W3Theory || Peter Quote
Reecey12345 Posted March 21, 2014 Author Posted March 21, 2014 I use this exact line in my Weekly Rewards also? < And it works perfect there. Quote
Razor42 Posted March 21, 2014 Posted March 21, 2014 event_add($r['userid'],"<a href='viewuser.php?u=$userid'>{$ir['username']}</a> rated you down.",$c); Try that Quote
Reecey12345 Posted March 21, 2014 Author Posted March 21, 2014 event_add($r['userid'],"<a href='viewuser.php?u=$userid'>{$ir['username']}</a> rated you down.",$c); Try that I tried this one earlier, no luck :( Quote
Blade Maker Posted March 21, 2014 Posted March 21, 2014 Reecey, can you post the function code? Quote
W3Theory || Peter Posted March 21, 2014 Posted March 21, 2014 There seems to be something missing, I see a blank spot right before the Unix-Timestamp. Quote
Newbie Posted March 21, 2014 Posted March 21, 2014 Query was INSERT INTO events VALUES('',,UNIX_TIMESTAMP(),0,'Reece rated you down.') has 2 , should be plus as pete stated there is a blank '' Query was INSERT INTO events VALUES('',UNIX_TIMESTAMP(),0,'Reece rated you down.') Quote
Reecey12345 Posted March 21, 2014 Author Posted March 21, 2014 As i said, that exact line i posted works perfectly fine with my Weekly Rewards there isn't any " missing Quote
KyleMassacre Posted March 21, 2014 Posted March 21, 2014 Your userid variable hasn't been instantiated yet. Which means your adding your function before the $r = $db->fetch_row($query). Just move it down a few lines. Sensless plug: or buy my Ajax player rating module from the MCC market place or my blog Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.