Jump to content
  • 0

query_sql


Jayz

Question


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

Whats wrong here, this is actually working but have [Warning]: script:query_sql: Too many columns, discarding last 1 columns. In the part of UPDATE

.@s = query_sql("SELECT `account_id` FROM `points_system` WHERE `account_id` = " + getcharid(3));
if (.@s) {
query_sql("UPDATE `points_system` SET `hpoints` = (`hpoints` + "+.@amount+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1");
} else {
query_sql("INSERT INTO `points_system` (`account_id`, `hpoints`) VALUES (" + getcharid(3) + ", " + .@amount + ")");
}

 

 

Edited by Jayz
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

10 hours ago, Jayz said:

Whats wrong here, this is actually working but have [Warning]: script:query_sql: Too many columns, discarding last 1 columns. In the part of UPDATE

.@s = query_sql("SELECT `account_id` FROM `points_system` WHERE `account_id` = " + getcharid(3));
if (.@s) {
query_sql("UPDATE `points_system` SET `hpoints` = (`hpoints` + "+.@amount+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1");
} else {
query_sql("INSERT INTO `points_system` (`account_id`, `hpoints`) VALUES (" + getcharid(3) + ", " + .@amount + ")");
}

 

 

what is the points_system table  structure?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

1 hour ago, Hyroshima said:

what is the points_system table  structure?

new database structure where the hpoints store.. instead use acc_reg_num i want to use it for my web system

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

Solve error typo

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