Problem after mysql_fetch_row_format
#6

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.
Reply


Messages In This Thread
Problem after mysql_fetch_row_format (i thing) - by doreto - 30.12.2012, 11:16
Re: Problem after mysql_fetch_row_format - by [HiC]TheKiller - 30.12.2012, 12:54
Re: Problem after mysql_fetch_row_format - by doreto - 30.12.2012, 13:31
Re: Problem after mysql_fetch_row_format - by doreto - 31.12.2012, 08:56
Re: Problem after mysql_fetch_row_format - by doreto - 01.01.2013, 11:17
Re: Problem after mysql_fetch_row_format - by AndreT - 02.01.2013, 10:56
Re: Problem after mysql_fetch_row_format - by doreto - 04.01.2013, 11:02
Re: Problem after mysql_fetch_row_format - by Roel - 04.01.2013, 11:21
Re: Problem after mysql_fetch_row_format - by Djole1337 - 04.01.2013, 12:03

Forum Jump:


Users browsing this thread: 2 Guest(s)