Subscription member list- How to display subscribers

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Subscription member list- How to display subscribers
shrek_rock
CZ Newbie
shrek_rock has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: May 30, 2004
0.00 posts per day
Posts: 8
Points: 1,219
   
How can i list subscribers. I can list the subscribers but only the userid, how can i match the userid from the subscribers table to the nuke_users_username ?.

Thanks icon_smile.gif



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Im not sure of the exact table fields but something like this will do it.


$result = $db->sql_query("SELECT s.subscription_id, u.user_id, u.username FROM ".$prefix."_subscriptions AS s LEFT JOIN ".$prefix."_users AS u ON s.subscription_id = u.user_id ORDER BY s.subscription_id DESC limit 0, 20");
    while ($row = $db->sql_fetchrow($result)) {
    $subscription_id = intval($row['subscription_id']);
    $user_id = intval($row['user_id']);
    $username = $row['username'];
    echo "$username";

    } //END SQL LOOP




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Subscription member list- How to display subscribers
shrek_rock
CZ Newbie
shrek_rock has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: May 30, 2004
0.00 posts per day
Posts: 8
Points: 1,219
   
Thanks very much for your help. i did some tweaking because as you said you were not sure if the tables were correct so I used the right ones and it's working great now icon_smile.gif.

phpnuke themes , tutorials , modules , blocks [ Register or login to view links on this board. ]



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum