unsupported format character 'D' (0' (0x
MySQL database connector for Python programming
Brought to you by:
adustman
I don't know if this is a bug, but this is the error
message:
unsupported format character 'D' (0' (0x
This is the SQL:
cur.execute(
"""
SELECT
b.company_name,
b.contact_title,
b.fname,
b.lname,
b.addr1,
b.addr2,
b.addr3,
b.town,
b.postcode,
w.warranty_no,
DATE_FORMAT(w.valid_from_date, '%D of %M %Y'),
DATE_FORMAT(w.valid_to_date,
'%D of %M %Y')
FROM
warranty w,
bus_cust b
WHERE
w.warranty_no = %s
AND
b.cust_id = w.customer_id
""", (warranty_no))
Logged In: YES
user_id=71372
Not a bug. Since MySQLdb uses the python % operator on the
query string, any percent signs which are part of your SQL
must be doubled, i.e. you need '%%D of %%M %%Y'