Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 05-20-2002, 08:16 PM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default What Query To Run?

Ok, I have vBStats installed on my board and I skipped one step accidently until about a few days later. That step was to add the ability in the admin center to do stuff like remove a URL from inclusion in the referrers thing and you were supposed to do that to your own domain. Well, after 3 days of waiting and finally doing it, I got 3303 hits from my own domain. How would I delete the first line:
Code:
1 www.starcraftsector.com 3303 2002-05-20 14:36:29
from the database and have all of the ['id'] numbers go down one? So what query would I run to delete that row and bring all of the other rows' ID numbers down one?

Code:
Edit  Delete  1  www.starcraftsector.com 3303 2002-05-20 14:36:29 
Edit  Delete  2  www.forumsector.tk 148 2002-05-18 22:32:29 
Edit  Delete  3  www.vbulletin.com 136 2002-05-20 16:12:30 
Edit  Delete  4  ca.f213.mail.yahoo.com 1 2002-04-13 15:50:26 
Edit  Delete  5  forum.starcraftsector.com 3 2002-04-13 19:39:07 
Edit  Delete  6  plainmail.ev1.net 4 2002-04-17 17:16:40 
Edit  Delete  7  www.balanghai.com 129 2002-04-17 15:11:11 
Edit  Delete  8  v1.nedstatbasic.net 1 2002-04-17 16:02:49 
Edit  Delete  9  admin.vbulletin.com 2 2002-04-29 01:54:52 
Edit  Delete  10 www.caraga.ph 27 2002-04-19 08:42:00 
Edit  Delete  11 www.google.ca 7 2002-05-17 15:23:41 
Edit  Delete  12 http://www.homeoffice-freemarketing-...and-service... 11 2002-04-21 08:42:29 
Edit  Delete  13 www.vbulletin.org 32 2002-05-17 13:11:45 
Edit  Delete  14 www.aletiaforums.com 3 2002-04-27 22:57:51 
Edit  Delete  15 lw9fd.law9.hotmail.msn.com 430 2002-05-19 19:22:55 
Edit  Delete  16 www.google.com 20 2002-05-20 14:37:08 
Edit  Delete  17 php.dinsol.com 1 2002-05-02 16:27:38 
Edit  Delete  18 directory.mozilla.org 1 2002-05-04 07:01:20 
Edit  Delete  19 www.google.nl 2 2002-05-09 10:20:30 
Edit  Delete  20 www.phantomstar.com 2 2002-05-06 16:53:52 
Edit  Delete  21 webmail.aol.com 3 2002-05-17 21:19:14 
Edit  Delete  22 google.yahoo.com 5 2002-05-16 04:36:01 
Edit  Delete  23 www.audiogalaxy.com 2 2002-05-08 18:47:57 
Edit  Delete  24 www.geocities.com 3 2002-05-09 15:24:09 
Edit  Delete  25 us.f210.mail.yahoo.com 2 2002-05-11 20:57:33 
Edit  Delete  26 fets3.freetranslation.com 4 2002-05-19 02:31:54 
Edit  Delete  27 www.teamareola.com 1 2002-05-12 18:18:16 
Edit  Delete  28 us.f215.mail.yahoo.com 2 2002-05-12 22:30:39 
Edit  Delete  29 us.f208.mail.yahoo.com 1 2002-05-14 14:21:31 
Edit  Delete  30 us.f149.mail.yahoo.com 2 2002-05-15 08:26:49
Reply With Quote
  #2  
Old 05-21-2002, 09:01 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]DELETE FROM tableName WHERE idField = 1;[/sql]
[sql]UPDATE tableName SET idField = idField - 1;[/sql]
Reply With Quote
  #3  
Old 05-21-2002, 10:01 AM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, thanks. Since when is [sql] a tag?
Reply With Quote
  #4  
Old 05-21-2002, 10:38 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I wrote it.

It's a special tag that highlights SQL queries, like the PHP tag. It's still not complete nor perfect so you shouldn't use it.
Reply With Quote
  #5  
Old 05-21-2002, 05:35 PM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit: Lol, haha, nevermind, I'm a retard. I got it, ignore the rest of this post.

Cool. Ok, my table for that is 'vbstats_referrer' so how would that query run? When I ran it like this:

DELETE FROM tablevbstats_referrer WHERE idField = 1;

It doesn't work... I also tried a space between 'table' and 'vbstats_referrer' but that didn't work.... I tried a period (.) between 'table' and 'vbstats_referrer'. Heh, sorry... not very good with mySQL. I wanted to buy a book on it a few days ago, but it was $40.
Reply With Quote
  #6  
Old 05-22-2002, 08:22 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

use this one aswell.

Or don't

Reply With Quote
  #7  
Old 05-22-2002, 08:56 PM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Huh... What does that do?
Reply With Quote
  #8  
Old 05-23-2002, 05:22 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nothing you want to try...
Reply With Quote
  #9  
Old 05-23-2002, 07:23 PM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lol. What would that have done?
Reply With Quote
  #10  
Old 05-24-2002, 06:18 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change everyone's usergroup to 0... Bad neo.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:07 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.06238 seconds
  • Memory Usage 2,247KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete