Jump to content
  • 0

Event Rewards Logs


RyokoMVP

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

hello i want to ask , before i use this script n SQL files work fine 100% , but now itsnt work again. my friend say now they dont use UPDATE and WHERE. but still error after i change it. can somebody help me?

 

Query_SQL("UPDATE `event_log` SET `won_by` = '" + Escape_SQL(StrCharInfo(0)) + "', `won_time` = NOW(), `price_id` = " + $get_item_id + ", `price_amount` = " + $get_item_amount + " WHERE `event` = 'Mr Password' AND `won_by` IS NULL");

 

Event_Log.sql

 

thanks for help

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

I believe you should post the error you get or telling what things isn't working ... as well as the script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

: DB 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 'WHERE `event` = 'Mr Password' AND `won_by` IS NULL' at line 1
[Debug]: at script.c:15731 - INSERT INTO `event_log` SET `won_by` = 'RyokoMVP', `won_time` = NOW(), `price_id` = 607, `price_amount` = 1 WHERE `event` = 'Mr Password' AND `won_by` IS NULL
[Debug]: Source (NPC): Mr Password at prontera (141,175)
[sql]: DB 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 'WHERE `event` = 'Mr Password' AND `won_by` IS NULL' at line 1
[Debug]: at script.c:15731 - INSERT INTO `event_log` SET `won_by` = 'RyokoMVP', `won_time` = NOW(), `price_id` = 607, `price_amount` = 1 WHERE `event` = 'Mr Password' AND `won_by` IS NULL
 
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

bump

You should post your WHOLE script instead of posting the script query. maybe Emistry can reproduce your errors.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

anyone help?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  


query_sql("UPDATE `event_log` SET `won_by` = '" + escape_sql(strcharinfo(0)) + "', `won_time` = NOW(), `price_id` = " + $cluck_item_id + ", `price_amount` = " + $cluck_item_amount + " WHERE `event` = 'Cluckers' AND `won_by` = NULL");

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

@emistry : i already use your script , but still doesnt want to make a event log @phpmyadmin

 

are my event_log.sql already to old ?

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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...