An SQL Query needed
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #1
An SQL Query needed
Hello Smile

Can any one provide me an sql query for a selective users from a selecive usergroup ?

I mean , I want Users of gid 6 and list them separately on another page.

Help needed Smile

Regards

[Image: logo.png]

[Image: twitter.png]
06-30-2010 05:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: An SQL Query needed
Maybe something like this:

SQL Code
$query = $db->simple_select('users','*','usergroup="6"');


06-30-2010 06:58 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #3
RE: An SQL Query needed
Then how to count them ?

PHP Code:
$query = $db->simple_select('users','*','usergroup="6"');
$count = $db_num_rows($query);


^ Is it right ?


[Image: logo.png]

[Image: twitter.png]
06-30-2010 03:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: An SQL Query needed

PHP Code:
$count = $db->num_rows($query);


07-01-2010 01:32 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #5
RE: An SQL Query needed
Yes, Thanks Smile

[Image: logo.png]

[Image: twitter.png]
07-03-2010 05:08 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: