Look at the different results when I switch types of quotes in
SQLLiteral:
>>> web.insert('foo',
>>> wtf=web.SQLLiteral("SHA1('yomomma')"),joe='bob',a=2,_test=True)
<sql: "INSERT INTO foo (a, joe, wtf) VALUES (2, 'bob',
SHA1('yomomma'))">
>>> web.insert('foo',
>>> wtf=web.SQLLiteral('SHA1("yomomma")'),joe='bob',a=2,_test=True)
<sql: 'INSERT INTO foo (a, joe, wtf) VALUES (2, \'bob\',
SHA1("yomomma"))'>
Is this a bug or am I doing something dumb?
I think if there is a problem it's because I have DBUtils or this:
sql_query = SQLQuery("INSERT INTO %s (%s) VALUES (%s)" % (
tablename,
", ".join(values.keys()),
', '.join([aparam() for x in values])
), values.values())
Might have something to do with two string formats being created here?
The first explicitly and the next passed to SQLQuery or maybe the
issue is in SQLQuery, perhaps here:
return self.s % tuple([sqlify(x) for x in self.v])
The use of sqlify?
I'm not sure. :o
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---