Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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.')

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...