• 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!

Solved [Php] An query error

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
Code:
Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\Adminpanel\pages\showcharacter.php on line 46


PHP:
  $equipment = $mysqli->query( 'SELECT * FROM `player_items` AS `i` LEFT JOIN `players` AS `p` ON `p`.`id` = `i`.`player_id` WHERE `p`.`name` = \''.$mysqli->real_escape_string( $_GET['editcharacter'] ).'\' AND `i`.`pid` = '.$pid.';' )->fetch_assoc( );
    
    switch( $equipment['itemtype'] )
    {
        case false:
            // show default image
            if($pid == 8): $main_content .=  '<td style="text-align: center; width: 32px; height: 32px;">soul '.$result['soul'].'</td>'; endif;
            $main_content .= '<td style="text-align: center; width: 32px; height: 32px;"></td>';
            if($pid == 8): $main_content .=  '<td style="text-align: center; width: 32px; height: 32px;">cap '.$result['cap'].'</td>'; endif;
            break;
 
Last edited:
Back
Top