Jayz Posted August 11, 2022 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Share Posted August 11, 2022 (edited) 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 August 11, 2022 by Jayz Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted August 11, 2022 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted August 11, 2022 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? Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted August 11, 2022 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted August 11, 2022 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 Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted August 12, 2022 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted August 12, 2022 Solve error typo Quote Link to comment Share on other sites More sharing options...
Question
Jayz
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 + ")"); }
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.