[PHP-DB] Re: (OT) SQL query repeats

2001-08-15 Thread Jonathan Hilgeman
Try one of the following: 1) Move the GROUP BY between WHERE and HAVING -OR- 2)SELECT l.*,lg.* FROM lesson l LEFT JOIN lesson_gle lg ON lg.l_id=l.l_id WHERE lg.glenum LIKE 'MA%' GROUP BY l.l_id ORDER BY l.l_id - Jonathan "Adv. Systems Design" <[EMAIL PROTECTED]> wrote in message [EMAIL PROT

[PHP-DB] Re: (OT) SQL query repeats

2001-08-15 Thread Jonathan Hilgeman
If you use "GROUP BY lesson.l_id" after your "ORDER BY lesson.l_id", you will not get any records with the same lesson.l_id value. - Jonathan "Adv. Systems Design" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hello: > > I have 2 tables...lesson and lesson_g