Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot, bind-address mysql multiple, sanibleone xxxx, ftp://192.168.100.100/, www.xxxcon

Links

XODOX
Impressum

#1: Beginner question

Posted on 2011-10-11 17:11:14 by Patrice Olivier-Wilson

I am trying to write a query for a web page that shows a list of users =
in a particular group.

There are 3 tables:
pm1_users that uses UserID
pm1_groupsubscriptions that uses UserID and GroupID
pm1_mailingroups that uses GroupID

So I want to show all the users that belong to a specific mailingroup

SELECT *
FROM pm1_groupsubscriptions, pm1_users
WHERE GroupID =3D 10

(10 =3D one of the mailingroups)

That isn't enough to get there. That shows all uses.

Thanks for any assistance.


Regards,

Patrice Olivier-Wilson
828-628-0500
http://Biz-comm.com
biz@biz-comm.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Report this message

#2: Re: Beginner question

Posted on 2011-10-11 17:19:43 by Andrew Moore

--000e0cd18332df9ef004af076ff5
Content-Type: text/plain; charset=ISO-8859-1

Hey, welcome to the lists,

Be mindful that your query is using 2 tables and 'SELECT *'.



On Tue, Oct 11, 2011 at 4:11 PM, Biz-comm <biz@biz-comm.com> wrote:

> I am trying to write a query for a web page that shows a list of users in a
> particular group.
>
> There are 3 tables:
> pm1_users that uses UserID
> pm1_groupsubscriptions that uses UserID and GroupID
> pm1_mailingroups that uses GroupID
>
> So I want to show all the users that belong to a specific mailingroup
>
> SELECT *
> FROM pm1_groupsubscriptions, pm1_users
> WHERE GroupID = 10
>
> (10 = one of the mailingroups)
>
> That isn't enough to get there. That shows all uses.
>
> Thanks for any assistance.
>
>
> Regards,
>
> Patrice Olivier-Wilson
> 828-628-0500
> http://Biz-comm.com
> biz@biz-comm.com
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=eroomydna@gmail.com
>
>

--000e0cd18332df9ef004af076ff5--

Report this message

#3: Re: Beginner question

Posted on 2011-10-11 17:23:31 by Johan De Meersman

----- Original Message -----
> From: "Andrew Moore" <eroomydna@gmail.com>
>
> Be mindful that your query is using 2 tables and 'SELECT *'.

Which probably means not so much to someone who doesn't even know what a join is :-)

Have a look at http://www.w3schools.com/sql/sql_join.asp .


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Report this message

#4: Re: Beginner question

Posted on 2011-10-11 17:31:33 by Patrice Olivier-Wilson

Thanks for the pointer. Digging out reference books to learn how to do a =
join.

:-)



On Oct 11, 2011, at 11:23 AM, Johan De Meersman wrote:

> Which probably means not so much to someone who doesn't even know what =
a join is :-)
>=20
> Have a look at http://www.w3schools.com/sql/sql_join.asp .

Regards,

Patrice Olivier-Wilson
828-628-0500
http://Biz-comm.com
biz@biz-comm.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Report this message