I am doing a parameter substitution, but when I execute the following statement I get an error. Could you tell me how should i escape % signs?
sql="select DATE_FORMAT(FROM_UNIXTIME(my_table.received_date),'%Y %M %d,%H:%i') from my_table where my_table.from_email=%s" then c.execute(sql,('[EMAIL PROTECTED]')) or c.execute(sql,(email)) I get an error : Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 137, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler raise errorclass, errorvalue ValueError: unsupported format character 'Y' (0x59) at index 59 Thank You Lucas _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig