0.7lb Posted August 3, 2008 Report Share Posted August 3, 2008 (edited) erors Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'mysql_localhost' (11001) in C:\AppServ\www\bans\admintop.php on line 27 Could not connect: Unknown MySQL server host 'mysql_localhost' (11001) fails <style type="text/css"> /*-------------admintop---------------*/ #admintop { font-size: 15px; color: #B22222; } #admintop td{ border: dotted; border-width: 1 0 0 0; padding-right: 20px; } #admintop th{ text-align: left; } </style> <?php echo "<table id='admintop'> <tr> <th>Admins</th> <th>Bani</th> </tr>"; $con = mysql_connect("localhost","root","*******"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("amxbans", $con); $result = mysql_query("SELECT count(*), admin_nick FROM amx_bans GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 10"); // DESC LIMIT while($row = mysql_fetch_array($result)) { $admins = $row['admin_nick']; $skaits = $row['count(*)']; echo "<tr> <td>$admins</td> <td>$skaits</td> </tr>"; } mysql_close($con); ?> </table> īsti nesaprotu kāpēc nevar connect pie localhost Edited August 3, 2008 by 0.7lb Link to comment Share on other sites More sharing options...
theNTH Posted August 3, 2008 Report Share Posted August 3, 2008 $con = mysql_connect("localhost","root","parole"); Link to comment Share on other sites More sharing options...
wap1337 Posted August 3, 2008 Report Share Posted August 3, 2008 (edited) tev jau errorā viss ir pateikt! bet tā es tev priekšā patekšu samaini mysql_localhost -> uz localhost un mysql_root -> root edited: eh pasteidzies ātrāk edited2: davaj visi kam vajag labaako adminu topu zog sourci Edited August 3, 2008 by wap1337 Link to comment Share on other sites More sharing options...
0.7lb Posted August 3, 2008 Author Report Share Posted August 3, 2008 (edited) nu es izcēlos ar stulbumu, viss iet Edited August 3, 2008 by 0.7lb Link to comment Share on other sites More sharing options...
Norek Posted August 3, 2008 Report Share Posted August 3, 2008 Visi mēs mācāmies Link to comment Share on other sites More sharing options...
Recommended Posts