Jayz Posted August 11, 2022 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
0 Hyroshima Posted August 11, 2022 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
0 Jayz Posted August 11, 2022 Author 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
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 + ")"); }
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.