Hab hier mal so ein beispiel code...
Aber als error haut er mir das raus: .str_replace("[Microsoft][ODBC SQL Server Driver][SQL Server]", "", odbc_errormsg()).
PHP
- <?
- $host = "";
- $user = "";
- $pass = "";
- $db = "";
- $sConn = odbc_connect("Driver={SQL Server};Server={".$host."}; Database={".$db."}", "".$user."", "".$pass."") or die("<center><b style=\"border:1px dashed #FF0000;\">".str_replace("[Microsoft][ODBC SQL Server Driver][SQL Server]", "", odbc_errormsg())."</b></center>");
- $sorgu = odbc_exec($sConn,"SELECT * FROM UniqueRanking ORDER BY Killer DESC");
- echo '<table border=1>
- <tr>
- <th>Player</th>
- <th>Unique</th>
- <th>Kills</th>
- </tr>';
- while($row = odbc_fetch_array($sorgu))
- {
- echo '
- <tr>
- <td>'.$row['Killer'].'</td> // das sagt ja aus das er aus der table die spalte Killer auslesen soll oder wenn ja ist ja das selbe mit den anderen zwei da unten
- <td>'.$row['Unique'].'</td>
- <td>'.$row['Kills].'</td>
- </tr>
- ';
- }
- echo '</table>';
- ?>