tags:

views:

58

answers:

3

I am trying to pass a string which has a '%' in it (its actually a sql query string). How do I pass the % (do I have to use a specific escape character?

eg: compute_answertime("%how do I%")

+4  A: 

Use another % to escape it

>>> compute_answertime("%%how do I%%")
jellybean
+1  A: 

use %%..........

srinivas reddy thatiparthy
A: 

You can use:

%%; DROP TABLE Students; --

Sorry, couldn't resist.

Muhammad Alkarouri
I'm trying to upvote this one
Insp