Jump to content

Question

Posted

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

8 answers to this question

Recommended Posts

Posted
: 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
 
Posted


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");

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...