Re: Nested Joins

2009-10-02 Thread Victor Subervi
now **exactly** what you’re sending to mysql. > > > > Regards, > > Gavin Towey > > > > *From:* Victor Subervi [mailto:victorsube...@gmail.com] > *Sent:* Thursday, October 01, 2009 3:04 PM > > *To:* Gavin Towey; mysql@lists.mysql.com > *Subject:* Re: Nested Join

RE: Nested Joins

2009-10-01 Thread Gavin Towey
g the query you're building to a string, then printing it out so you know *exactly* what you're sending to mysql. Regards, Gavin Towey From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Thursday, October 01, 2009 3:04 PM To: Gavin Towey; mysql@lists.mysql.com Subject: Re: Nested Jo

Re: Nested Joins

2009-10-01 Thread Victor Subervi
ictor Subervi [mailto:victorsube...@gmail.com] > *Sent:* Thursday, October 01, 2009 2:25 PM > *To:* Gavin Towey; mysql@lists.mysql.com > *Subject:* Re: Nested Joins > > > > On Thu, Oct 1, 2009 at 4:03 PM, Gavin Towey wrote: > > Joins aren't nested like that, unless yo

RE: Nested Joins

2009-10-01 Thread Gavin Towey
s/articles/mysql-db-design-ch5.pdf http://dev.mysql.com/doc/refman/5.1/en/join.html Regards, Gavin Towey From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Thursday, October 01, 2009 2:25 PM To: Gavin Towey; mysql@lists.mysql.com Subject: Re: Nested Joins On Thu, Oct 1, 2009 at 4:03

Re: Nested Joins

2009-10-01 Thread Victor Subervi
On Thu, Oct 1, 2009 at 4:03 PM, Gavin Towey wrote: > Joins aren't nested like that, unless you use a subquery. I think you just > need to remove the parens around the second join. > I tried that and no go :( > > For better help: > 1. show the real SQL -- echo the statement. Most people here d

RE: Nested Joins

2009-10-01 Thread Gavin Towey
ent: Thursday, October 01, 2009 1:34 PM To: mysql@lists.mysql.com Subject: Nested Joins Hi; I'm new to join statements. Here's my python syntax: cursor.execute('select * from %s left join products on %s.Item=products.Item (left join categories on products.Category=categories.ID);&#x

Nested Joins

2009-10-01 Thread Victor Subervi
Hi; I'm new to join statements. Here's my python syntax: cursor.execute('select * from %s left join products on %s.Item=products.Item (left join categories on products.Category=categories.ID);' % (client, client)) I believe it's clear how I want to nest, but I don't know how to repair my syntax