Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Support > php issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-10-2008, 10:33 PM
Senior Member
 
Join Date: Dec 2006
Posts: 544
Send a message via MSN to karimali831
Default PHP Issue

Hi members,

Is there anything wrong with the below code

Code:
    //GET TEAM INVITATIONS
    $query = "SELECT teamid,playerid,inviterid,DATE_FORMAT(invitedate, '%M %d, %Y') FROM teammembersinv WHERE playerid='$plyr[id]' ORDER by invitedate";
    // $invitations = resource id
    $invitations = mysql_query($query);
    while(list($team,$playerid,$inviterid,$invitedate)=mysql_fetch_row($invitations)){
        $teaminfo=mysql_query("SELECT teamname FROM teams WHERE id='$team'");
        $tinfo=mysql_fetch_array($teaminfo);
        $inviterinfo=mysql_query("SELECT alias FROM users WHERE id='$inviterid'");
        $inviter=mysql_fetch_array($inviterinfo);
        $status=member_status($status);
        $invites=$invites."$out[bulletcenter] » Invitation by <a href='$url[base]/$file[teams]?teamid=$team'>$tinfo[teamname]</a><br>"; //outputs the result
    }
    if(!$invites){
        $invites = "$out[bulletcenter] » 0 Invitations"; 
    }

Thanks

Last edited by karimali831; 08-10-2008 at 10:42 PM.
Reply With Quote
  #2 (permalink)  
Old 08-13-2008, 12:12 AM
black-dog's Avatar
Member
 
Join Date: May 2008
Location: Newcastle under Lyme
Posts: 54
Send a message via Yahoo to black-dog
Default

Well I'm guessing that, as you posted it, yes there is something wrong with it. I assume you are getting no output and that's because there is no echo or print in there (though this could come later). There are variables and arrays that are not defined and arrays that are defined and not used but I assume that this is not the whole code. Also I would have though you could have achieved this by using a join - but without knowing if your db is properly normalised I can't really say.

Your question is rather too vague. What did you expect it to do?
__________________
black-dog
4theweb.co.uk Web stuff
slipperyhill.co.uk Band

Last edited by black-dog; 08-13-2008 at 12:18 AM.
Reply With Quote
  #3 (permalink)  
Old 08-23-2008, 08:29 PM
Senior Member
 
Join Date: Dec 2006
Posts: 544
Send a message via MSN to karimali831
Default

oo sorry, I'm still learning. I'll try and be more specific
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:38 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum