vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Display full list of referrers and referrals (https://vborg.vbsupport.ru/showthread.php?t=25173)

dwh 09-03-2001 09:51 PM

Hey VB developers!! Don't miss this thread, there's definitely issues with the php vbcode!! The above "&n" actually reads "LIMIT 100", even when I edit it but no matter what i do it shows as &n
weird.

dwh 09-03-2001 09:53 PM

Quote:

Originally posted by Joshs
PHP Code:

SELECT COUNT(*) AS referralsuser.usernameuser.userid FROM user AS users
                   LEFT JOIN user ON 
(users.referrerid user.userid)
                   
WHERE users.referrerid <> AND
                   
user.userid NOT IN (0)
                   
GROUP BY users.referrerid
                   ORDER BY referrals DESC 

Looked like it worked right...

note that the code I gave you got chopped, run it w/ the limit 100...

I thought an extra row may show up w/ some missing data....if not I'll look at the code again....somehow reflistbit is being called one time too many...

Joshs 09-03-2001 09:53 PM

I had to take out the &n because it said it was an invalid SQL statement... Could that be the problem?

Joshs 09-03-2001 09:54 PM

You have an error in your SQL syntax near '&n LIMIT 0, 30' at line 7

dwh 09-03-2001 09:58 PM

since the php vbcode isn't working, once again, here's the proper code to try:

"SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE users.referrerid <> 0 AND
user.userid NOT IN (0)
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 100"

Joshs 09-03-2001 10:00 PM

You have an error in your SQL syntax near 'LIMIT 0, 30' at line 7

dwh 09-03-2001 10:02 PM

You're using an old version of phpMyAdmin....just pull off the LIMIT 100 portion...then scan the results.

If there's more than 30, be sure to go to the next page and check that every line is ok.

Joshs 09-03-2001 10:04 PM

I am using the newest version of phpmyadmin... Everything that was pulled with that SQL looks alright... BTW whats your URL?

dwh 09-03-2001 10:17 PM

My boss won't let me post my url :(

OK, I have a question. How many rows were returned from the sql statement? It should have been 7.


Josh
Kckazdude
pug
DonnieD
cryzten
1gigkid
Andrew

Joshs 09-03-2001 10:18 PM

Yes, that is correct. Maybe its just a mistake in the php file or one of my templates...


All times are GMT. The time now is 10:36 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.01041 seconds
  • Memory Usage 1,741KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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