nuclearsilo583 / zephyrus-store-preview-new-syntax

My rewritten zephyrus store
61 stars 40 forks source link

Fixed item expiration SQL queries #147

Closed azalty closed 1 year ago

azalty commented 1 year ago

Thanks to #146 for reporting an SQL error

This patch fixes the following error:

[store.smx] SQL error happened.
Query: delete `store_items`, `store_equipment`from `store_items`, `store_equipment` where (store_items.unique_id = store_equipment.unique_id) and store_items.date_of_expiration<>0 and store_items.date_of_expiration<1676067429
Error: near "store_items": syntax error

It should also fix items not properly expiring as:

In both cases, it should now delete both equipped and unequipped expired items

Please note that my work might need more optimization. We could use a function to clear the DB since code is reused in 2 different locations.

❌ Didn't try to compile ❌ Didn't test in game

nuclearsilo583 commented 1 year ago

thanks