![]() |
Im looking for a hack that shows the top posters on your baords on the main page, so I can make it show up on my home page, anyone ever seen one?
|
Code:
SELECT user.posts, user.username FROM user ORDER BY user.posts DESC, user.username DESC LIMIT 0, 10 |
Wow thanks, but how do I, and what can I do with one line of code? What do i do to incorp it into a php file in another DIR
|
Sorry, I wasn't thinking...
PHP Code:
HTH -jim |
THANKS MAN! Wow, this wasnt hard like it thought, sweet!
|
I did that and I get this error
Warning: Supplied argument is not a valid MySQL-Link resource in /web/sites/3/leokiller/www.flyaway.f2s.com/board/main.php on line 15 and on line 15 the only thing on is is this symbol -> { |
help ... :(
|
help help help plzzzzzzz
|
try changing the lines to this:
PHP Code:
Good Luck, |
is sais error connecting to DB ,how is that possible ? It uses my global.php yes ? Well since my vbulletin shows no problems and connects without errors ,how can this script make an error connecting ? Please help , I really want this script to work
|
<html>
<head> <title>blabla</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#000000" text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#CCCCCC" leftmargin=0 rightmargin=0 bottommargin=0 topmargin=0> <?php require("global.php"); print("<table><tr><td colspan=\"2\">Top Posters</td></tr> <tr><td><b>Username</b></td><td><b>Posts</b></td></tr>"); $db_link = @mysql_pconnect("$dbservername", "$dbusername", "$dbpassword"); mysql_select_db ("$dbname", $db_link) or die("Error connecting to DB"); $query = mysql_query("SELECT posts, username FROM user ORDER BY user.posts DESC, user.username DESC LIMIT 0, 10") or die("Query Error:$query"); while($row = mysql_fetch_array($query)) { $username = $row["username"]; $posts = $row["posts"]; print("<tr><td>$username</td><td>$posts</td></tr>"); } print("</table>"); ?> that's the script I use ,and this is the error I get : Warning: Supplied argument is not a valid MySQL-Link resource in /web/sites/3/blabla111111/www.blabla.f2s.com/board/main.php on line 15 Error connecting to DB |
$db_link is wrong I think , with what should I replace it ?
|
do you have this in the same directory had global.php? if not you have to have the full path for it to open it
|
it's in the same directory
|
Quote:
|
All times are GMT. The time now is 12:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|