Thread: sql
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-08-2021 , 16:31   Re: sql
Reply With Quote #9

I do not know enough and the code is wrong.

1. nVault supports strings for the key and value fields, it will not accept your iKey variable.
2. What does "iKey = 150" represent .. what does the 150 value correspond to?
3. If the key does not exist, iCurrentTime = get_systime() will never get called so the value will be 0 when used in your else condition.
4. In your else, I believe you want this: if(iTS >= (iCurrentTime + get_systime(259200)))
But I think it, and a lot of your code, can still be improved once I know better what you're doing.
5. The SQL can be changed to "DELETE FROM %s;"
__________________
Bugsy is offline