Some MySQL questions (updated) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some MySQL questions (updated) (
/showthread.php?tid=210244)
Some MySQL questions (updated) -
hanzen - 12.01.2011
Okei, so I have a small problem.
I'm trying to add advanced bans with time in MySQL, everything works fine not just the time itself (^lol). It looks good in the table. Using date format and gettime().
So this is my query:
Код:
SELECT * FROM `bans` WHERE `plid` = %d LIMIT 1;
Then I fetch the field with the date (seems to be loading just fine). I guess it's my code and not the query/mysql there's something wrong with. This may sound noobish, but help (....)
pawn Код:
if(gettime() > unbandate)
......
I also have another a lot easier question, I want to split a string with sscanf. The string could look something like this:
Код:
400, 54, 21, 43, 1, 150
The string will always contain 6 integers. So can I do this easily with sscanf?