In sms_premium_expire empty fields are kept from premiums that have been expired. Normally no problem because they don't take up much space in DB, but because I want to request the expire_date of an item to echo in user_items, it gives an error if the item_id occurs 2 times in the table.
I want to delete the table every time the item premium expires.
In index of sms-payment folder there is a line that clears the logs and modifies that table t_item.
function sp_change_premium( $item_id, $premium, $date = NULL) {
ModelSP::newInstance()->updatePremiumByItemId( $item_id, $premium ); // change b_premium to t_item table
Can I modify this line so that the table is also removed in t_sms_premium_expire?
function sp_change_premium( $item_id, $premium, $date = NULL) {
ModelSP::newInstance()->updatePremiumByItemId( $item_id, $premium ); // change b_premium to t_item table
$sql ="DELETE FROM oc_t_item_sms_premium_expire WHERE expire_date = ' ' or expire_date is null";
Marc