I'm not sure what you're doing with a single-quote table name (?) but I
observed your statements have different results after string substitution.
In the first case, substituting the "Single' Quote" string results in:
"SELECT * FROM table1 WHERE name = Single' Quote LIMIT 1"
Whereas in your
>
> I have other, pre-existing tables I need to query data from, so using the
> db.table1 syntax won't work without re-creating them entirely (I think).
>
What do you mean by "re-creating them entirely?" You certainly don't have
to re-create the actual tables in the database. Though you would
rows = db(db.table1.name=="Single ' Quote").select(limitby=(0,1))
web2py exists so that you do not have to use raw SQL. it is dangerous.
On Tuesday, 21 March 2017 06:13:32 UTC-5, Travis Smith wrote:
>
> Hi guys,
>
> I can't seem to find anything anywhere because everything just says "it
>
3 matches
Mail list logo