02.01.2013, 10:56
I appreciate you PMing me, here are a few suggestions:
1. Do not use the loop. You explicitly are dealing with one ROW of data only, so the looping is not necessary. Additionally you could (perhaps should, depending on your system design) add a LIMIT 1 clause to the query.
2. Select only the necessary fields - SELECT field1,field2,field3,... FROM table (in your case, SELECT unban_time,reason FROM bans WHERE ...)
(3. Use better means of parsing. Your current method is slow and most likely working, but maybe not.)
Also jesus christ I've never seen a function such as SecondsToDHMS. It keeps on carrying the initial calculation on to the others - I don't think that's very good given the fact that PAWN is slow on calculations in the first place.
1. Do not use the loop. You explicitly are dealing with one ROW of data only, so the looping is not necessary. Additionally you could (perhaps should, depending on your system design) add a LIMIT 1 clause to the query.
2. Select only the necessary fields - SELECT field1,field2,field3,... FROM table (in your case, SELECT unban_time,reason FROM bans WHERE ...)
(3. Use better means of parsing. Your current method is slow and most likely working, but maybe not.)
Also jesus christ I've never seen a function such as SecondsToDHMS. It keeps on carrying the initial calculation on to the others - I don't think that's very good given the fact that PAWN is slow on calculations in the first place.