SA-MP Forums Archive
Possible to escape %i ? - 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)
+--- Thread: Possible to escape %i ? (/showthread.php?tid=444389)



Possible to escape %i ? - iTorran - 16.06.2013

I'm trying to do some MySQL queries that will fetch the date of a timestamp.
So, for that, I am using this in the query "FROM_UNIXTIME(`start`, '%d/%m/%y %H:%i')"
As you can see, it contains %i which it uses to give me minutes, however since SA-MP also uses %i for integers, it is replacing what should be "%d/%m/%y %H:%i" with "%d/%m/%y %H:2'" (due to an integer placement further along the query)

Is there any way of getting around this?
I am formatting it with mysql_format, but also tried strcat and format


Re: Possible to escape %i ? - iTorran - 16.06.2013

Thanks