Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial release of the cash shop sales #1825

Merged
merged 14 commits into from Feb 15, 2017
Merged
Fixed an incorrect insert statement
* Follow up to c0339a9.
Thanks to fictionx!
  • Loading branch information
aleos89 committed Dec 29, 2016
commit d2f8852a56f6e2510b9cd0b5f9afac36ec6c6063
@@ -292,7 +292,7 @@ enum e_sale_add_result sale_add_item( uint16 nameid, int32 count, time_t from, t
return SALE_ADD_DUPLICATE;
}

if( SQL_ERROR == Sql_Query(mmysql_handle, "INSERT INTO `%s`(`nameid`,`start`,`end`,`amount`) VALUES ( '%d', FROM_UNIXTIME(%d), FROM_UNIXTIME(%d), '%d', '%d' )", sales_table, nameid, (uint32)from, (uint32)to, cash_shop_items[CASHSHOP_TAB_SALE].item[i]->price, count) ){
if( SQL_ERROR == Sql_Query(mmysql_handle, "INSERT INTO `%s`(`nameid`,`start`,`end`,`amount`) VALUES ( '%d', FROM_UNIXTIME(%d), FROM_UNIXTIME(%d), '%d' )", sales_table, nameid, (uint32)from, (uint32)to, count) ){
Sql_ShowDebug(mmysql_handle);
return SALE_ADD_FAILED;
}