Advertisement
Advertisement
| 04.23.2008 at 01:50AM PDT, ID: 23345767 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: |
<html>
<body>
<?php
function Output_Entries() {
/*
Make the connection to the database. The syntax is
odbc_connect( 'SYSTEM_DSN' , 'USER', 'PASSWORD' );
$cnx will hold the
pconnect is used to establish a persistent database
connection to the Database until the procedure is completed.
*/
$cnx = odbc_connect( 'Stats' , 'root', '' );
if (!$cnx) {
Error_handler( "Error in odbc_connect" , $cnx );
}
// send a simple odbc query . returns an odbc cursor
$cur= odbc_exec( $cnx, "select #, Player, Position, [Games Played], Goals, Assists, Points, Shootout, [Penalty Minutes] from tblStats" );
if (!$cur) {
Error_handler( "Error in odbc_exec (no cursor returned) " , $cnx );
}
echo "<table width="557" border="1">
<tr>
<th width="12" scope="col"><div align="center" class="style5 style16">
<div align="center">#</div>
</div> </th>
<th width="102" scope="col"><div align="center" class="style5 style16">
<div align="center">Player</div>
</div> </th>
<th width="53" scope="col"><div align="center" class="style5 style16">
<div align="center">Position</div>
</div> </th>
<th width="97" scope="col"><div align="center" class="style5 style16">
<div align="center">Games Played </div>
</div></th>
<th width="39" scope="col"><div align="center" class="style5 style16">
<div align="center">Goals</div>
</div> </th>
<th width="48" scope="col"><div align="center" class="style5 style16">
<div align="center">Assists</div>
</div> </th>
<th width="41" scope="col"><div align="center" class="style5 style16">
<div align="center">Points</div>
</div> </th>
<th width="60" scope="col"><div align="center" class="style5 style16">
<div align="center">Shootout</div>
</div> </th>
<th width="113" scope="col"><div align="center" class="style5 style16">
<div align="center">Penalty Minutes</div>
</div> </th>
</tr>";
$nbrow=0; //Local variable to count number of rows
// fetch the succesive result rows
while( odbc_fetch_row( $cur ) ) {
$nbrow++;
$# = odbc_result( $cur, 1 );
$Player = odbc_result( $cur, 2 );
$Position = odbc_result( $cur, 3 );
$GP = odbc_result( $cur, 4 );
$Goals = odbc_result( $cur, 5 );
$Assists = odbc_result( $cur, 6 );
$Points = odbc_result( $cur, 7 );
$Shootout = odbc_result( $cur, 8 );
$PM = odbc_result( $cur, 9 );
echo "<tr height="17">
<td height="17"><div align="center">$#</div></td>
<td><div align="center">$Player</div></td>
<td><div align="center">$Position</div></td>
<td><div align="center">$GP</div></td>
<td><div align="center">$Goals</div></td>
<td><div align="center">$Assists</div></td>
<td><div align="center">$Points</div></td>
<td><div align="center">$Shootout</div></td>
<td><div align="center">$PM</div></td>
</tr>";
}
echo "</table>";
// close the connection. important if persistent connection are "On"
odbc_close( $cnx);
}
function Error_Handler( $msg, $cnx ) {
echo "$msg \n";
odbc_close( $cnx);
exit();
}
Output_Entries();
?>
</body>
</html>
|