[thelist] complicated sql
Rob Smith
rob.smith at THERMON.com
Mon Dec 8 08:29:13 CST 2003
Hey,
> How do I write a query to retrieve BANDS.band_name, SHOWINFO.show_date,
> and PHOTOS.photo_name? I had this:
I would have written your Sql query a little bit different. May help..
SQLQuery = "select b.band_name, s.show_date, p.photo_name from showinfo s,
bands b, photos p where b.band_id = p.photo_bandid and s.band_id = b.band_id
Order by s.show_date"
Let us know,
Rob
p.s. if this doesn't work, you may want to check your primary/foreign keys,
also the data itself.
More information about the thelist
mailing list