[ERROR with showing 3 Top Players PHP] Please take a look
Warning: odbc_exec(): in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 34
Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 36
Warning: odbc_exec(): in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 42
Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 44
Warning: odbc_exec(): in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 50
Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 52
Archer:
Notice: Undefined variable: archer_1 in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 60
Mage:
Notice: Undefined variable: mage_1 in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 63
knight:
Notice: Undefined variable: knight_1 in I:\xampp\htdocs\Kal\Top3\ranking_top_3.php on line 66
guys whats wrong ?
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Quote:
Originally Posted by
Ismir93
check odbc ?:O
Or maybe u don't make 3x character's in ur server ! to make its work without any problem u .ve to make 3x char
kn8 arch mage
to get top 3
Re: [ERROR with showing 3 Top Players PHP] Please take a look
What php file are u using, and the odbc is correctly setup?
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Hello guys i created 3 Chars (mage , archer , knight ) still same problem.
Quitta what you mean with what php files ur using ( i use this from release selection 3 Top Players ) i think ODBC is correctly installed
thx for answer me back guys
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Re: [ERROR with showing 3 Top Players PHP] Please take a look
could someone take a look to help me ?
Re: [ERROR with showing 3 Top Players PHP] Please take a look
add odbc to system DSN then it should work
Re: [ERROR with showing 3 Top Players PHP] Please take a look
thanks for your fast replay but it added it to system DNS and its still not workin :S
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Re: [ERROR with showing 3 Top Players PHP] Please take a look
uncheck the box of apache service and upload your php file
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Normal Ranking</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="description" content="KalOnline Ranking">
<meta name="author" content="Rekat">
<meta name="keywords" content="Ranking, KalOnline">
<meta name="language" content="en">
<meta name="robots" content="index, follow">
<link rel="stylesheet" type="text/css" href="ranking.css">
</head>
<body>
<center>
<?php
$config = array(
'db_username' => 'sa', // database username
'db_password' => ' i know i need to up my PW in here', // database password
'db_dsn' => 'kal_db', // system DSN to the database
'debug' => false, // show SQL errors if true
);
$conn = odbc_connect($config['db_dsn'],
$config['db_username'],
$config['db_password']);
$pknight = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 0 AND [Admin] = 0 And Reborn Is NULL OR Class = 0 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$ppknight = odbc_exec($conn,$pknight);
while($knight = odbc_fetch_array($ppknight)){
$knight_1 = '<b>'.$knight['Name'].'</b>';
};
$parcher = $parcher = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 2 AND [Admin] = 0 AND Reborn Is NULL OR Class = 2 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$pparcher = odbc_exec($conn,$parcher);
while($archer = odbc_fetch_array($pparcher)){
$archer_1 = ' <b>'.$archer['Name'].'</b>';
};
$pmage = $pmage = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 1 AND [Admin] = 0 And Reborn Is NULL OR Class = 1 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$ppmage = odbc_exec($conn,$pmage);
while($mage = odbc_fetch_array($ppmage)){
$mage_1 = '<b>'.$mage['Name'].'</b>';
};
echo '<div id="box_bg">';
echo '<div id="top3_archer">';
echo '<div id="top3_archer_title"><div id="top3_archer_text">Archer: </div></div>';
echo '<div id="top3_archer_form"><div id="top3_archer_form_text">'.$archer_1.'</div></div></div>';
echo '<div id="top3_mage">';
echo '<div id="top3_mage_title"><div id="top3_mage_text">Mage: </div></div>';
echo '<div id="top3_mage_form"><div id="top3_mage_form_text">'.$mage_1.'</div></div></div>';
echo '<div id="top3_knight">';
echo '<div id="top3_knight_title"><div id="top3_knight_text">Knight: </div></div>';
echo '<div id="top3_knight_form"><div id="top3_knight_form_text">'.$knight_1.'</div></div></div>';
?>
</center>
</body>
guys heres php file
Re: [ERROR with showing 3 Top Players PHP] Please take a look
PHP Code:
$parcher = $parcher = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 2 AND [Admin] = 0 AND Reborn Is NULL OR Class = 2 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$pparcher = odbc_exec($conn,$parcher);
while($archer = odbc_fetch_array($pparcher)){
$archer_1 = ' <b>'.$archer['Name'].'</b>';
};
$pmage = $pmage = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 1 AND [Admin] = 0 And Reborn Is NULL OR Class = 1 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$ppmage = odbc_exec($conn,$pmage);
wrong is here
$parcher = $parcher =
it should be : $parcher =
$pmage = $pmage =
it should be : $pmage =
Re: [ERROR with showing 3 Top Players PHP] Please take a look
Correct php
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Normal Ranking</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="description" content="KalOnline Ranking">
<meta name="author" content="Rekat">
<meta name="keywords" content="Ranking, KalOnline">
<meta name="language" content="en">
<meta name="robots" content="index, follow">
<link rel="stylesheet" type="text/css" href="ranking.css">
</head>
<body>
<center>
<?php
$config = array(
'db_username' => 'sa', // database username
'db_password' => ' i know i need to up my PW in here', // database password
'db_dsn' => 'kal_db', // system DSN to the database
'debug' => false, // show SQL errors if true
);
$conn = odbc_connect($config['db_dsn'],
$config['db_username'],
$config['db_password']);
$pknight = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 0 AND [Admin] = 0 And Reborn Is NULL OR Class = 0 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$ppknight = odbc_exec($conn,$pknight);
while($knight = odbc_fetch_array($ppknight)){
$knight_1 = '<b>'.$knight['Name'].'</b>';
};
$parcher = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 2 AND [Admin] = 0 AND Reborn Is NULL OR Class = 2 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$pparcher = odbc_exec($conn,$parcher);
while($archer = odbc_fetch_array($pparcher)){
$archer_1 = ' <b>'.$archer['Name'].'</b>';
};
$pmage = "SELECT TOP 1 * FROM [Player] WHERE [Class] = 1 AND [Admin] = 0 And Reborn Is NULL OR Class = 1 AND Admin = 0 And Reborn = 0 ORDER BY [Level] Desc, [Exp] Desc";
$ppmage = odbc_exec($conn,$pmage);
while($mage = odbc_fetch_array($ppmage)){
$mage_1 = '<b>'.$mage['Name'].'</b>';
};
echo '<div id="box_bg">';
echo '<div id="top3_archer">';
echo '<div id="top3_archer_title"><div id="top3_archer_text">Archer: </div></div>';
echo '<div id="top3_archer_form"><div id="top3_archer_form_text">'.$archer_1.'</div></div></div>';
echo '<div id="top3_mage">';
echo '<div id="top3_mage_title"><div id="top3_mage_text">Mage: </div></div>';
echo '<div id="top3_mage_form"><div id="top3_mage_form_text">'.$mage_1.'</div></div></div>';
echo '<div id="top3_knight">';
echo '<div id="top3_knight_title"><div id="top3_knight_text">Knight: </div></div>';
echo '<div id="top3_knight_form"><div id="top3_knight_form_text">'.$knight_1.'</div></div></div>';
?>
</center>
</body>
Kinda Regards, Hobo