How to make pawn to ignore % character in string?
#1

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:

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);
But this part DATE_FORMAT(DATE_ADD(curdate(), INTERVAL %d DAY), '%d/%m/%Y') gets messed up and I have MySQL results like

Code:
37/m/Y
I tryed to add escape charater \ but it doesn't help... Does anyone has any idea how to solve this?

Reply


Messages In This Thread
How to make pawn to ignore % character in string? - by Dujma - 25.11.2009, 20:42
Re: How to make pawn to ignore % character in string? - by Mikep. - 25.11.2009, 20:43
Re: How to make pawn to ignore % character in string? - by Peter_Corneile - 25.11.2009, 20:46
Re: How to make pawn to ignore % character in string? - by yom - 25.11.2009, 20:47
Re: How to make pawn to ignore % character in string? - by Dujma - 25.11.2009, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)