• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[php]Pdo array S:

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
Fatal error: Cannot use object of type PDOStatement as array in C:\xampp\htdocs\aac\system\injections\search\check\02-eq\injection.php on line 70

Damn can some1 help :S

PHP:
list( $list, $items ) = array( array( 2, 1, 3, 6, 4, 5, 9, 7, 10, 8 ), 0 );
foreach( $list as $pid )
{
    $items++;
    $equipment = $SQL->query( 'SELECT * FROM `player_items` AS `i` LEFT JOIN `players` AS `p` ON `p`.`id` = `i`.`player_id` WHERE `p`.`name` = \''.$player->getName().'\' AND `i`.`pid` = '.$pid.';' );

    switch( $equipment['itemtype'] )
    {
		case false:
			// show default image
			if($pid == 8): ECHO  '<td style="text-align: center; width: 32px; height: 32px;">soul '.$result['soul'].'</td>'; endif;
            ECHO '<td style="text-align: center; width: 32px; height: 32px;"></td>';
			if($pid == 8): ECHO  '<td style="text-align: center; width: 32px; height: 32px;">cap '.$result['cap'].'</td>'; endif;
            break;
			
        default:
			if($pid == 8): ECHO  '<td style="text-align: center; width: 32px; height: 32px;">soul '.$result['soul'].'</td>'; endif;
            ECHO  '<td style="text-align: center; width: 32px; height: 32px;"><img src="http://otland.net/images/items/'.$equipment['itemtype'].'.gif" alt="" /></td>';
			if($pid == 8): ECHO  '<td style="text-align: center; width: 32px; height: 32px;">cap '.$result['cap'].'</td>'; endif;
            break;
    }
    if ( $items % 3 === 0 )
    {
        ECHO  '</tr><tr>';
    }
}
 
Back
Top