You are here: Re: PHP SQL Query « PHP Programming Language « IT news, forums, messages
Re: PHP SQL Query

Posted by Domestos on 02/13/06 01:58

"Mick" <mickoc@gmail.com> wrote in message
news:1139788418.350629.281030@g14g2000cwa.googlegroups.com...
> Hi all,
>
> I am trying to construct a sql query which will retrieve the group name
> and
> number of people in each group from the below table structure
>
> sms_people
> - member_id
> - member_name
> - member_lastname
> - member_number
> - member_region
>
> sms_people_groups
> - group_id
> - member_id
>
> sms_groups
> - group_id
> - group_name
> - group_description
>
> All i have available to search on is the group_id. I'm having trouble
> retrieving the group_name and the number of members it contains as they
> are in separate tables..
>
> Any help much appreciated,
>
> Cheers,
> Michael
>

SELECT group_name FROM sms_groups WHERE group_id='xxx'
SELECT COUNT(member_id) FROM sms_people_groups WHERE group_id='xxx'

These are the SQL statments and some work will be required to pass it into
PHP.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация