Re: (OT) SQL query repeats
| From: | Jonathan Hilgeman | Date: | Wed, 15 Aug 2001 21:05:59 +0000 |
| Subject: | Re: (OT) SQL query repeats | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11406@lists.php.net to get a copy of this message | ||
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" <asd_2000@yahoo.com> wrote in message
news:20010815210154.96011.qmail@web14202.mail.yahoo.com...
> hello:
>
> I have 2 tables...lesson and lesson_gle (which holds
> repeating data for lesson, i.e. l_id, glenum)
>
> the following query gets results, but there are
> repeated entries (one for every repeat in lesson_gle
> table)
>
> SELECT *
> FROM lesson, lesson_gle
> WHERE lesson.l_id = lesson_gle.l_id
> HAVING lesson_gle.glenum LIKE 'MA%'
> ORDER BY lesson.l_id
>
> Any ideas on how to get the data to not repeat?
>
> Thanks
>
> Luis
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/