vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Retrive The Field Info (https://vborg.vbsupport.ru/showthread.php?t=258270)

3amalah 02-03-2011 08:45 AM

Retrive The Field Info
 
Hello I Need To Show The Highest Top Members In Reputation In Header

Or The Highest Member In Reputation In Header

--------------- Added [DATE]1296733658[/DATE] at [TIME]1296733658[/TIME] ---------------

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 [DATE]1296761452[/DATE] at [TIME]1296761452[/TIME] ---------------

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

Quote:

Originally Posted by al3bed (Post 2158824)
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

Quote:

Originally Posted by Lynne (Post 2165865)
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

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

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']."), ";
}

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

Code:

$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 ?

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

Quote:

Originally Posted by 3amalah (Post 2165971)
(nothing), (nothing), (nothing)

But When I Make It Like That

Code:

$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 ?

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 [DATE]1298508413[/DATE] at [TIME]1298508413[/TIME] ---------------

Quote:

Originally Posted by ForumsMods (Post 2165999)
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....7&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 [DATE]1298509744[/DATE] at [TIME]1298509744[/TIME] ---------------

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


All times are GMT. The time now is 08:29 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
  • Page Generation 0.01236 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete