Ir para conteúdo

Featured Replies

Postado

fala galera meu gesior 2012 está dando esse erro no meu trade off line

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\auctionsystem.php on line 2

 

Spoiler

<?PHP
$auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`,
`auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name`
FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')-
>fetchAll();
$players = 0;
       
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']
['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer
add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br
/><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer
withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';
    if(empty($auctions))
    {
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is
no one active Auction.</TD></TR></TABLE>';
        $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vDk/">vDk</a>.</small></p>';
    }
    else
    {
    foreach($auctions as $auction) {
        $players++;
            if(is_int($players / 2))
                $bgcolor = $config['site']['lightborder'];
            else
                $bgcolor = $config['site']['darkborder'];
        $cost = round($auction['cost']/1000, 2);
        $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img
src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction
['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction
['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction
['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';
    }
    
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD
class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD
class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD
class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';
    $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>';
}
    ?> 

 

OT PURA DIVERSÃO | IP: otfun.servegame.com | 8.60 | Port: 7171

 

1584817_1.png

Postado
59 minutos atrás, OtFunEX disse:

fala galera meu gesior 2012 está dando esse erro no meu trade off line

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\auctionsystem.php on line 2

 

  Mostrar conteúdo oculto

<?PHP
$auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`,
`auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name`
FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')-
>fetchAll();
$players = 0;
       
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']
['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer
add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br
/><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer
withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';
    if(empty($auctions))
    {
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is
no one active Auction.</TD></TR></TABLE>';
        $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vDk/">vDk</a>.</small></p>';
    }
    else
    {
    foreach($auctions as $auction) {
        $players++;
            if(is_int($players / 2))
                $bgcolor = $config['site']['lightborder'];
            else
                $bgcolor = $config['site']['darkborder'];
        $cost = round($auction['cost']/1000, 2);
        $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img
src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction
['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction
['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction
['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';
    }
    
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD
class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD
class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD
class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';
    $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>';
}
    ?> 

 

 

Tente agora:

<?PHP
$auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`,
`auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name`
FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')-
$players = 0;
       
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']
['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer
add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br
/><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer
withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';
    if(empty($auctions))
    {
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is
no one active Auction.</TD></TR></TABLE>';
        $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vDk/">vDk</a>.</small></p>';
    }
    else
    {
    foreach($auctions as $auction) {
        $players++;
            if(is_int($players / 2))
                $bgcolor = $config['site']['lightborder'];
            else
                $bgcolor = $config['site']['darkborder'];
        $cost = round($auction['cost']/1000, 2);
        $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img
src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction
['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction
['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction
['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';
    }
    
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']
['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD
class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD
class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD
class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';
    $main_content .= '<br /><p align="right"><small>System created by <a
href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>';
}
    ?> 

Ajudei? +REP !

                                          King is Back !                                  Está vendo esse coraçãozinho? Dar um Voto Positivo?                                                                                                                                                                                                       clica ali se eu te ajudei muito. Obrigado !

 

[Tutorial] Colocando sua senha no novo XAMPP

[Tutorial] Como compilar tfs 1.2 no Visual Studio 2015

------------------------------------------

  • Contato:

                    Discord: Lirosz#6563

                      Ts3: 104.154.235.159

 

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo