25.11.2009, 20:42
I have a little problem. I'm trying to insert mysql function DATE_FORMAT but it doesn't work because pawno won't ignore the % character.
This is the string:
But this part DATE_FORMAT(DATE_ADD(curdate(), INTERVAL %d DAY), '%d/%m/%Y') gets messed up and I have MySQL results like
I tryed to add escape charater \ but it doesn't help... Does anyone has any idea how to solve this?
This is the string:
pawn Code:
format(query, sizeof(query), "INSERT INTO `"TABLE_BANS"` (`player`, `admin`, `reason`, `expireDate`, `expireTime`) VALUES ('%s', '%s', '%s', DATE_FORMAT(DATE_ADD(curdate(), INTERVAL %d DAY), '%d/%m/%Y'), curtime())",
player,
admin,
reason,
days);
Code:
37/m/Y