mina Posted November 4, 2017 Posted November 4, 2017 (edited) Hello everyone, my English is not good, Sorry! I gonna add a 'SQL Command' source if (SQL_ERROR == Sql_Query(mmysql_handle, "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('%d,%s,%u,%d')", acc_reg_num_table, sd->status.account_id, "#bonuspoint", '0', value)) Sql_ShowDebug(mmysql_handle); but, it crashes when executed. How can I solve it ? thanks guys! I have solved it myself Edited November 12, 2017 by mina Quote
0 Psychonaut Posted November 7, 2017 Posted November 7, 2017 (edited) Can try something like this if (Sql_Query(mmysql_handle, "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('%d','%s','%u','%d');", acc_reg_num_table, sd->status.account_id, "#bonuspoint", '0') != SQL_SUCCESS) Sql_ShowDebug(mmysql_handle); Edited November 7, 2017 by Psychonaut Quote
-1 mina Posted November 12, 2017 Author Posted November 12, 2017 (edited) On 2017/11/7 at 6:20 PM, Psychonaut said: Can try something like this if (Sql_Query(mmysql_handle, "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('%d','%s','%u','%d');", acc_reg_num_table, sd->status.account_id, "#bonuspoint", '0') != SQL_SUCCESS) Sql_ShowDebug(mmysql_handle); i tried it~ But the error message pops up : DB error - Duplicate entry '2000000-#bonuspoint-0' for key 'PRIMARY' thanks guys! I have solved it myself Edited November 12, 2017 by mina Quote
Question
mina
Hello everyone, my English is not good, Sorry!
I gonna add a 'SQL Command' source
if (SQL_ERROR == Sql_Query(mmysql_handle, "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('%d,%s,%u,%d')", acc_reg_num_table, sd->status.account_id, "#bonuspoint", '0', value)) Sql_ShowDebug(mmysql_handle);
but, it crashes when executed.
How can I solve it ?
thanks guys!
I have solved it myself
Edited by mina3 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.