PDA

View Full Version : mysql_fetch_array


HEki
10-30-2005, 01:47 AM
http://www.clan-sun.com/top10.php

can someone pls tell me what is wrong?

HEki
10-30-2005, 05:46 AM
<?
/**
* Mod Title: Top 10 Posters
* Mod Version: phpBB 2.0.4
* Author: Charlie Page
* Description: Shows the top 10 posters at your board
* Release: v1.0, 05.31.2004
***
* Demo: http://www.xboxassassin.com/e3/forums
* Installation Level: Easy
* Installation Time: 2 minutes
* Files To Edit: This one
* Included Files: top10.php
***
* Installation Notes:
* Upload this file and set $ppath, change the prefix and $url,
* Include this into a page and your done!
*/
$url = "http://www.clan-sun.com/board"; // No trailing slash
$ppath = "board/config.php"; // Physical path to the config.php file
if(empty($count))

//-----------------[ DO NOT EDIT BELOW HERE ]-------------------------
include_once("$ppath");
$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("here we die at connection");
@mysql_select_db("$dbname",$db) or die("here we die");

echo "<table cellspacing=\"3\" cellpadding=\"5\" border=\"0\" align=\"center\"><tr><td><b>Username</b></td><td><b>Posts</b></td><td><b>Topics</b></td></tr>";

$query="SELECT * FROM gocms2_users ORDER BY `user_posts` DESC LIMIT 0, 5";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)) {
$username = "$row[username]";
$id = "$row[user_id]";

if ($row[user_id] == "-1") {

} else {

$query2 = mysql_query("SELECT * FROM gocms2_topics WHERE topic_poster='$id'") or die(mysql_error());
$num = mysql_num_rows($query2);

echo "<tr><td><a href=\"$url/profile.php?mode=viewprofile&u=$row[user_id]\"><center>$row[username]</center></a></td><td><center>$row[user_posts]</center></td><td>$num</td></tr>";
}
}
?>

PsychoticDude85
10-31-2005, 06:55 AM
Not Found
The requested URL /top10.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.clan-sun.com Port 80