Hi. Colleagues, will someone help in the SQL script?
I need to get TOP 10 from TBL_Reputation.
I wrote something like that:
<?php
include('00header.php');
include('adodb/adodb.inc.php');
include('00tohtmlnew.inc.php');
include('00connString.php');
GLOBAL $gSQLMaxRows,$gSQLBlockRows;
$gSQLMaxRows = 1000; // max no of rows to download
$gSQLBlockRows=1000; // max no of rows per table block
$conn = &ADONewConnection("ado_mssql");
if (@$conn->PConnect($gameDSN, "", "", "")) {
echo <<<END
END;
$recordSet = &$conn->Execute('Select TOP 10 FLD_CHARACTER, FLD_POINT FROM TBL_Reputacja');
if ($recordSet) {
if ($recordSet->EOF) {
print "Not Available";
} else {
rs2htmlnum($recordSet, 'BORDER=0', Array('Nick', 'Point'));
}
$recordSet->Close(); // optional
} else {
print "Not Available";
}
echo <<<END
</td><td align="center" valign="top" width="25%">
END;
END;
echo <<<END
</td></tr></table>
</td><td width="10"> </td><td align="left" bgcolor="#111">
<table border="0"><tr><td align="right"></td><td>
END;
$conn->Close(); // optional
} else {
print "Statistics is not available because the server is busy or down.";
}
?>
Everything works with the fact that the ranking is not by the number of points ;/
I need to get TOP 10 from TBL_Reputation.
I wrote something like that:
<?php
include('00header.php');
include('adodb/adodb.inc.php');
include('00tohtmlnew.inc.php');
include('00connString.php');
GLOBAL $gSQLMaxRows,$gSQLBlockRows;
$gSQLMaxRows = 1000; // max no of rows to download
$gSQLBlockRows=1000; // max no of rows per table block
$conn = &ADONewConnection("ado_mssql");
if (@$conn->PConnect($gameDSN, "", "", "")) {
echo <<<END
END;
$recordSet = &$conn->Execute('Select TOP 10 FLD_CHARACTER, FLD_POINT FROM TBL_Reputacja');
if ($recordSet) {
if ($recordSet->EOF) {
print "Not Available";
} else {
rs2htmlnum($recordSet, 'BORDER=0', Array('Nick', 'Point'));
}
$recordSet->Close(); // optional
} else {
print "Not Available";
}
echo <<<END
</td><td align="center" valign="top" width="25%">
END;
END;
echo <<<END
</td></tr></table>
</td><td width="10"> </td><td align="left" bgcolor="#111">
<table border="0"><tr><td align="right"></td><td>
END;
$conn->Close(); // optional
} else {
print "Statistics is not available because the server is busy or down.";
}
?>
Everything works with the fact that the ranking is not by the number of points ;/