View Full Version : Retrive The Field Info
3amalah
02-03-2011, 08:45 AM
Hello I Need To Show The Highest Top Members In Reputation In Header
Or The Highest Member In Reputation In Header
--------------- Added 1296733658 at 1296733658 ---------------
Edit
Lets Say This is Show The Reputation Of You
{vb:raw bbuserinfo.field5}
Whats The Code To Show Highest User In This Field ?
--------------- Added 1296761452 at 1296761452 ---------------
Edit 2
SELECT COUNT( * ) AS `Rows` , `field5`
FROM `userfield`
GROUP BY `field5`
ORDER BY `field5`
LIMIT 0 , 30
I Found The Table That I Was Searching For.
Is There Anyone Who Can Help Me To Show It Up In Forums Templates
al3bed
02-04-2011, 07:53 PM
you need to use plugin for your code, save result in variable, then insert it in a template
3amalah
02-05-2011, 07:34 PM
you need to use plugin for your code, save result in variable, then insert it in a template
Welcome Ya Man Sa3eed El3twee Told Me That
Can You Do That Coz I Tried And Faild Really
Lynne
02-23-2011, 04:28 PM
Are you trying to show the person with the highest reputation, or the person with the highest number in field5? userfield.field5 is not the reputation, unless you have set it up to be that way?
3amalah
02-23-2011, 08:15 PM
Are you trying to show the person with the highest reputation, or the person with the highest number in field5? userfield.field5 is not the reputation, unless you have set it up to be that way?
Look On This Mod In Attachment
It Show Highest Reputation
I Tried To Edit It To Make Get The Highest Number In Field 8
The Original Code
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY reputation DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['reputation']."), ";
}
My Edit
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
Thats What I Need
The Highest Number In X Field
Lynne
02-23-2011, 08:22 PM
And what is the result of your edit? Isn't it working? What is the output - can we see it?
3amalah
02-23-2011, 08:27 PM
(nothing), (nothing), (nothing)
But When I Make It Like That
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['posts']."), ";
}
The Posts Appears Instead Of Reputation And Everything Going Fine
Now Why It Cant Import Data From The userfield Table
Is There's Somethign Wrong In This Code ?
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
ForumsMods
02-23-2011, 09:18 PM
(nothing), (nothing), (nothing)
But When I Make It Like That
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['posts']."), ";
}The Posts Appears Instead Of Reputation And Everything Going Fine
Now Why It Cant Import Data From The userfield Table
Is There's Somethign Wrong In This Code ?
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
Take a not taht you have to join user table to get username.
Also LIMIT 0 is not necessary.
And what is $adet?
Lynne
02-23-2011, 10:07 PM
What Adrian said about $adet - what is it? And, userfield only has userinformation, not username, so that isn't going to spit out (you need to JOIN with the user table). But, you should have gotten something to spit out. You didn't even get the "(" and ")" to spit out? If not, then you aren't outputting it correctly. What are you doing to output the variable $sonuclaryaz? We really do need to see the whole thing or else we can't tell where you are going wrong.
3amalah
02-23-2011, 10:45 PM
Thats A Product From vBulletin Iam Not The Programmer I Put It As Example Coz Its Show What I Need Exactly
Can You Give Me The Right PHP Code To Get Userfied Information Or Can U Do A Plugin Doing This I Think You Are Understood My Needs Now
I Need To Retrieve The Userfield Information From Userfield Table From X Field
And Show It In Forumhome
If You Can't Just Give Me The Way On How To Start
A Small Plugin Like The One I Posted Show Highest Member In X Field
And I Appreciate Your help Really
--------------- Added 1298508413 at 1298508413 ---------------
Take a not taht you have to join user table to get username.
Also LIMIT 0 is not necessary.
And what is $adet?
See My Post Here Plz Sir Adrian
https://vborg.vbsupport.ru/showpost.php?p=2166027&postcount=10
Can You Edit This Product For Me To Satisfy My Need And Make It Show The Highest Members In Field X Instead Of Reputation
--------------- Added 1298509744 at 1298509744 ---------------
Iam Going To Sleep Now I Ask You Plz To Subscribe To Thread Plz So I Can Reach You
And Thanks SO Much For Your Help You Are Gentlemen
Lynne
02-23-2011, 11:13 PM
Try a query more like:
$getrepx = $db->query_read("SELECT userfield.field8, user.userid, user.username
FROM " . TABLE_PREFIX . "userfield
LEFT JOIN " . TABLE_PREFIX . "user
ON (user.userid = userfield.userid)
ORDER BY userfield.field8 DESC LIMIT 10");
Not knowing how you are putting this into the page though doesn't help us figure out why nothing is displaying. You really need to post the part where you add it to the template - both the php page and what is in the template.
3amalah
02-24-2011, 06:23 AM
Try a query more like:
$getrepx = $db->query_read("SELECT userfield.field8, user.userid, user.username
FROM " . TABLE_PREFIX . "userfield
LEFT JOIN " . TABLE_PREFIX . "user
ON (user.userid = userfield.userid)
ORDER BY userfield.field8 DESC LIMIT 10");
Not knowing how you are putting this into the page though doesn't help us figure out why nothing is displaying. You really need to post the part where you add it to the template - both the php page and what is in the template.
Hello Lynne Thanks So Much For Your Answer Look
https://vborg.vbsupport.ru/attachment.php?attachmentid=126927&stc=1&d=1298535707
Thats The Product
I Edited It With The Code You Provided Me
All I Need It To Do Is Just Show The Highest Member In Field 8
I Dont Need More Features Or Anything
Or Just Write Me The Php Code And I Will try For It
And Special Thanks For You
Lynne
02-24-2011, 02:22 PM
I don't want to know what the original looks like, I am only interested in what you are doing with the code for your site. You need to post about *your* product.
3amalah
02-24-2011, 04:14 PM
I don't want to know what the original looks like, I am only interested in what you are doing with the code for your site. You need to post about *your* product.
Ok Lynne I Made Field Show Every User Level
Everyone Has A Level
I Need The Top Users In Field X That Show Levels In Forumhome
To Become Like That
Lynne : Level 10
3amalah : Level 5
xxx : Level 2
Lynne
02-24-2011, 04:54 PM
I understand what you *want*. I want to see all your current code. Please post your plugin, telling us the hook location, and put code tags around it. And post any template, giving us the template name, and put code tags around it. If you insert something into an existing template, tell us what template and give us about 10 lines from it. We cannot help if we cannot see what your code currently looks like.
3amalah
02-24-2011, 05:02 PM
I understand what you *want*. I want to see all your current code. Please post your plugin, telling us the hook location, and put code tags around it. And post any template, giving us the template name, and put code tags around it. If you insert something into an existing template, tell us what template and give us about 10 lines from it. We cannot help if we cannot see what your code currently looks like.
Iam Sorry I Dont Have A Code Right Now I Just Was Installing The Top Rep Product
And I Found It The Same Idea That Iam Searching For
So I posted It But Iam Currently Dont Have A Code
I Just Need To Show This Data In Forumhome Template
The Field Number Is Field 8
Lynne
02-24-2011, 06:48 PM
If you aren't writing any code for this, then I would suggest hiring someone to do it. We are trying to help you write it here, but if you aren't actually trying to write it, then we can't help you.
3amalah
02-24-2011, 08:02 PM
If you aren't writing any code for this, then I would suggest hiring someone to do it. We are trying to help you write it here, but if you aren't actually trying to write it, then we can't help you.
Ok Lynne One Last Question
I WIll Do The Same As The Product I Showed You
Could You Provided Me With The Code That Get The Data From Database
From Userfield ---> Field X
And I Will make The Variable And Plugin
And Thanks So Much
Lynne
02-24-2011, 09:18 PM
I already provided you with the query to get the data from the database on the last page.
3amalah
02-25-2011, 10:58 AM
I already provided you with the query to get the data from the database on the last page.
Aha I Saw It Now Thank You Lynne I Will Try It Myself With Your Code
And Thanks For Your Help
And Sorry For Wasting Your Time :)
Lynne
02-25-2011, 04:39 PM
You aren't wasting my time at all. Please don't feel that you are.
3amalah
02-28-2011, 05:24 AM
Thanks Lynne Iam Almost Made The Product I Will Show You After Finish Ok
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.