vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help needed with an SQL query to remove referrers (https://vborg.vbsupport.ru/showthread.php?t=155354)

moonclamp 08-15-2007 10:54 PM

Help needed with an SQL query to remove referrers
 
Hi,

I want to delete all the refers from a certain user. I've been using the referrer system on one account to track signups through my google advert. But this account now has so many referrals it looks wrong in the stats hack I've got installed.

Can anyone help me with simple query that can purge the refers for a particular user?

Eikinskjaldi 08-15-2007 11:30 PM

Quote:

Originally Posted by moonclamp (Post 1318531)
Hi,

I want to delete all the refers from a certain user. I've been using the referrer system on one account to track signups through my google advert. But this account now has so many referrals it looks wrong in the stats hack I've got installed.

Can anyone help me with simple query that can purge the refers for a particular user?

The referrer count is generated from a query in member.php:
PHP Code:

"SELECT COUNT(*) AS count FROM " TABLE_PREFIX "user WHERE referrerid = $userinfo[userid]

This suggests you need to delete the referrerid from the user table for all users referred by the member in question.

[sql]UPDATE user set referrerid=0 where referrerid=particular_user[/sql]

moonclamp 08-16-2007 12:36 AM

That worked, thanks :)


All times are GMT. The time now is 08:38 AM.

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.01376 seconds
  • Memory Usage 1,712KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete