Jump to content
  • 0

Query_sql problem.


_Dynosawr_

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

Hey, I wrote this script and the query_sql command isn't working correctly. I hope someone knows what's wrong with it.

http://pastebin.com/raw.php?i=ZSF9Dfrw

post-4637-0-59941600-1339110448_thumb.jpg

Edited by Joey
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  113
  • Reputation:   5
  • Joined:  06/06/12
  • Last Seen:  

try this,

query_sql "UPDATE `char` SET `name` = '"+.@newname$+"' WHERE `char_id` = '"+getcharid(0)+"'";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

OMG I LOVE YOU! THANKS <33333333

PS: That means it worked.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  113
  • Reputation:   5
  • Joined:  06/06/12
  • Last Seen:  

oh ahaha, np. It was just a guess, lol ;P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   101
  • Joined:  11/13/11
  • Last Seen:  

Just to explain, you can use backticks(`) only to escape object names(tables, columns, etc). You must use quote(') for strings ;)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

Ahhh okay, thanks :)

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