What's new

Skrypty & Kody Przenosiny skryptu z Gesiora na Nicaw

Status
Not open for further replies.

SanninStory

https://www.twitch.tv/sdrn
Joined
Oct 13, 2012
Messages
1,778
Reaction score
119
Siemanko.

Mam taki ma?y problem z jednym skryptem, kt?ry chc? przenie?? z G?siora na Nicaw Acc.
Silnik oczywi?cie TFS 0.3.6, 8.54, wi?c ?adnych kolizji z baz? danych by? nie powinno.

B??d:
PHP:
Fatal error: Uncaught exception 'DatabaseQueryException'
Message: Error #1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SQL query: SELECT * FROM `players` WHERE `id` = ;
File: sql.php on line: 94
Script was terminated because something unexpected happened. You can report this, if you think it's a bug.

Debug Backtrace:Disabled

Obecny stan Sytuacji:
841_blad.jpg


Kodzik:
PHP:
<?php 
include ("include.inc.php");
$ptitle="Head Hunters - $cfg[server_name]";
include ("header.inc.php");
?>
<div id="content">
<div class="top">Head Hunters</div>
<div class="mid">

<?PHP 
$SQL = AAC::$SQL;

# Tables
$a = '#c6c6c6';
$b = '#d5d5d5';
$c = '#e4e4e4';

# Data
$SQL->myQuery('SELECT * FROM `bounty_hunters` ORDER by `id` DESC;');

echo '<table border="0" cellspacing="1" width="100%">
<tr bgcolor="'.$a.'"><td width="3%">#</td><td width="20%"><b>Hunted by</b></td><td width="15%" colspan="2"><b>Reward</b></td><td width="20%"><b>Hunted player</b></td><td width="20%"><b>Killed by</b></td></tr>';

$datalist = 0;
while ($data = $SQL->fetch_array()) {
    if(is_int($datalist / 2))
        $bgcolor = $b;
            else
        $bgcolor = $c;
$datalist++;

$huntedby = $SQL->myQuery('SELECT * FROM `players` WHERE `id` = '.$data['fp_id'].';');
$huntedplayer = $SQL->myQuery('SELECT * FROM `players` WHERE `id` = '.$data['sp_id'].';');
$killedby = $SQL->myQuery('SELECT * FROM `players` WHERE `id` = '.$data['k_id'].';');

if($killedby == 0) { $killedby['name'] = 'STILL ALIVE'; };

echo '<tr bgcolor="'.$bgcolor.'"><td><span style="font-size:11px;color:#a8a8a8;">'.$datalist.'</span></td><td><a href="/index.php/character/view/'.strtolower($huntedby['name']).'"><span style="font-size:11px;">'.strtoupper($huntedby['name']).'</span></a></td><td><span style="font-size:11px;color:#909090;">'.$data['prize'].'</span></td><td><span style="font-size:11px;">GOLD</span></td><td><a href="/index.php/character/view/'.strtolower($huntedplayer['name']).'"><span style="font-size:11px;">'.strtoupper($huntedplayer['name']).'</a></td><td><a href="/index.php/character/view/'.strtolower($killedby['name']).'"><span style="font-size:11px;">'.strtoupper($killedby['name']).'</a></td></tr>';
}
echo '</table>';

?> 

</div>
<div class="bot"></div>
</div>
<?php include ("footer.inc.php");?>

Pozdrawiam i czekam na Odpowied?!
 

Netrunner

Banned
Joined
Apr 11, 2014
Messages
281
Reaction score
32
Odp: Przenosiny skryptu z Gesiora na Nicaw

nie ma wyniku
$SQL->myQuery('SELECT * FROM `bounty_hunters` ORDER by `id` DESC;');
 

SanninStory

https://www.twitch.tv/sdrn
Joined
Oct 13, 2012
Messages
1,778
Reaction score
119
Odp: Przenosiny skryptu z Gesiora na Nicaw

No w?asnie w tym problem, ?e jest :D
816_bazae.png
 

SanninStory

https://www.twitch.tv/sdrn
Joined
Oct 13, 2012
Messages
1,778
Reaction score
119
Odp: Przenosiny skryptu z Gesiora na Nicaw

Od?wie?am!
 
Status
Not open for further replies.
Top