View Full Version : Query And Template
Almax1
10-12-2003, 11:20 AM
SELECT *
FROM `user`
ORDER BY `userrating
is the sql on the DB
Right i want to make a simple query showing the username & userating with userating in reverse order first 30 people
And i want to incorporate it into a standard template (i will clean up this later)
pretty simle task just need to be shown please :D
all-the-vb
10-12-2003, 01:03 PM
$userating = $DB_site->query("SELECT username,userating from user ORDER BY userrating ASC limit 30");
while ($rate = $DB_site->fetch_array($userating)) {
eval("\$userating .= \"".gettemplate("userating_bits")."\";");
}
eval("dooutput(\"".gettemplate("userating")."\");");
i think this you want ?
Almax1
10-12-2003, 03:10 PM
so how do i match that bit of code into a template ??
just trying to understand nearly there :D
all-the-vb
10-12-2003, 04:54 PM
cause we put it in while
put the var $rate[username] And $rate[userrating] in the (userrating_bits) template
Then you must add $userrating var into (userrating) template
sorry for my bad english.
corsacrazy
10-12-2003, 05:52 PM
does this have sumthing to do with this hack
https://vborg.vbsupport.ru/showthread.php?t=31749&page=1&pp=15&highlight=rate+user
?
Almax1
10-12-2003, 08:56 PM
No doesnt work right :(
the hack is here
https://vborg.vbsupport.ru/showpost.php?p=418407&postcount=1
i just wanted to create an add on for a chart with top 30 & worst 30 sort of thing
i'm half way there i think
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.