Indeed, pbreit.

Did you check if your SQL query is correct?
print db._lastsql would help, too.

Baby steps, baby. Baby steps.

--
Vinicius Assef



On 07/25/2012 01:58 PM, pbreit wrote:
I don't really understand what you're trying to do but I would recommend
trying to simplify. First, you don't always need to do a join or a left
join. Try to figure out if those are really necessary. For example, do
you really need to join the questions and the progress or can you
retrieve those separately? Second, you're only selecting for two fields.
That may be OK but I would suggest selecting for all fields (ie, delete
"db.userCard.id,db.card.id," from select()). If you want to optimize
*after* you get it working, then you can do so. Third, working with
datetime and DB can be difficult. Try to get the query working before
adding a timedate query component.

When I build a complex query, I start with one query, make it work, then
add a query, make it work, and so on.

--




--



Reply via email to