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
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>';
}
}