vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   What Query To Run? (https://vborg.vbsupport.ru/showthread.php?t=38850)

CeleronXL 05-20-2002 08:16 PM

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


Admin 05-21-2002 09:01 AM

[sql]DELETE FROM tableName WHERE idField = 1;[/sql]
[sql]UPDATE tableName SET idField = idField - 1;[/sql]

CeleronXL 05-21-2002 10:01 AM

Cool, thanks. Since when is [sql] a tag?

Admin 05-21-2002 10:38 AM

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.

CeleronXL 05-21-2002 05:35 PM

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

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. :(

Neo 05-22-2002 08:22 PM

use this one aswell.

Or don't

:)

CeleronXL 05-22-2002 08:56 PM

Huh... What does that do?

Admin 05-23-2002 05:22 AM

Nothing you want to try...

CeleronXL 05-23-2002 07:23 PM

Lol. What would that have done?

Admin 05-24-2002 06:18 AM

Change everyone's usergroup to 0... Bad neo. ;)


All times are GMT. The time now is 07:17 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.01825 seconds
  • Memory Usage 1,731KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete