View Single Post
  #10  
Old 01-24-2011, 10:06 AM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 32,384
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

I think I see the error...

Just replace everything on that page between the End Prepwork and Begin Template with this:

PHP Code:
if($isloggedin == "yes"){

    
$group getgroup();
    
$cancp cancp($group);

    if(
$cancp == "yes"){
    
        
$article_title "Promo Codes";
        
$article_content "<table width='400' border='1'><tbody><tr><td><b>Type</b></td><td><b>Reward</b></td><td><b>Promo Code</b></td></tr>";
        
        
$query "SELECT * FROM " .$prefix "adoptables WHERE whenisavail='promo'";
        
$result mysql_query($query);
        
$num mysql_num_rows($result);
        
        
$i=0;
        while(
$i $num){
            
$promocodes = @mysql_result($result,$i,"promocode");
            
$type = @mysql_result($result,$i,"type");
            
            
$article_content $article_content."<tr><td>Adoptable</td><td>".$type."</td><td>".$promocodes."</td></tr>";
            
$i++;
        }
        
        
$article_content $article_content."</tbody></table>";
    }else{
     
        
$article_title "Access Denied";
        
$article_content "Access Denied";
        
    }
    

The issue is $i is not involved in the array, so it's only reading the first row. I'm not great with arrays so I just reverted it to results...
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote