Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » General vBulletin Section » vBulletin Modification Tutorials » [How To] Run a Query
Reply

 

  • Thread Tools
Old 04-07-2004, 06:59 AM   #1
Ken Iovino
vBulletin Guru

Ken Iovino's Avatar

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss2695
Location: Miami, Florida
Age: 27
Ken Iovino is on a distinguished road
Status: Offline Default [How To] Run a Query
This small tutorial will guide you threw the steps of running a query. Queries are often needed to to be run before a hack can work properly. If your reading a hack install file, and come across something that says "run the following queries" This is what you can do.



There are three diffrent ways to run queries. So pick which is best for you.


Version 1 of 3 (Admin CP If turned on in config.php)
  1. Log into your Admin Control Panel (located at www.yoursite.com/forums/admincp)
  2. On the left menu scroll down to the very bottom. You should see "Import & Maintenance" (screenshot 1a)
  3. Click on "Execute SQL Query" (screenshot 1a)
  4. You should see "Manual Query" Go ahead and run the following query.
    Code:
    DELETE FROM session
    
    (screenshot 1b)
  5. You will see a message that says "Confirm Query Execution" Click continue (Screenshot 1c)
  6. Then you will be redirected to a "vBulletin Message" In this case "Affected Rows: 0"
  7. That wasn't to hard no was it?

ScreenShot A
ScreenShot B
ScreenShot C


--------------------------------


Version 2 of 3 (phpmyadmin)
  • Log into phpMyAdmin. This will be located in your control panel where you are being hosted. Most sites use cPanel X.
  • phpMyAdmin will be located in one of two locations.
    1. On the main page of your cPanelx after you have logged in. Should be a link called phpMyAdmin
    2. On the main page you will see "MySQL Databases" click that and scroll to the very bottom and you should see a link that says "phpMyAdmin" click it. That should log you into phpMyAdmin.

  • Great now where logged in.
  • Choose your forums database in the dropdown menu located on the top left hand of that page (screenshot 2a)
  • After you select your forums database you will be redirected to a page with a list of things. Some should say Table, Action. Records, Type. Size, and Overhead.
  • On the top you will see a link that says "SQL" Click it, that will directed you to the page were you can run queries (screenshot 2b)
  • You will see a box to type in
  • Go ahead and run the following query.
    Code:
    DELETE FROM session
    
    (screenshot 2c)
  • a popup message will show asking "Do you really want to: DELETE FROM session. JUst press okay.
  • That was easy right?

ScreenShot A
ScreenShot B
ScreenShot C


--------------------------------


Version 3 of 3 (Uploading .sql files via phpmyadmin)
  • Few times you may have to upload a .sql file via phpMyAdmin.
  • Log into phpMyAdmin using the instructions from the above tutorial.
  • Once logged into phpMyAdmin
  • Choose your forums database in the dropdown menu located on the top left hand of that page (screenshot 3a)
  • After you select your forums database you will be redirected to a page with a list of things. Some should say Table, Action. Records, Type. Size, and Overhead.
  • On the top you will see a link that says "SQL" Click it, that will directed you to the page were you can run queries (screenshot 3b)
    You will see a box to type in and under that box will be something that says. "Or Location of the textfile "
  • From there you my click browse, and choose the location of the .sql file and click submit/go
  • Thats it very simple!

ScreenShot A
ScreenShot B
ScreenShot C

If you have any questions about running queries, please don't not hesitate to ask how to questions in the General Hacking forum. Thanks for reading.
Ken Iovino / Escalate Media
Reply With Quote
Old 06-13-2006, 01:31 AM   #2
Norman
Coder

Norman's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 ssssss242
Location: [Italy]
Norman is on a distinguished road
Send a message via MSN to Norman
Status: Offline Default
About first version: When I go on AdminCp -> Execute SQL Query board show me this message:

Quote:
Originally Posted by vBulletin Message
You are not authorized to execute SQL queries

Go Back
What's wrong?

EDIT: I'm in local, and I use EasyPHP
Reply With Quote
Old 06-13-2006, 04:13 AM   #3
Ken Iovino
vBulletin Guru

Ken Iovino's Avatar

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss2695
Location: Miami, Florida
Age: 27
Ken Iovino is on a distinguished road
Status: Offline Default
Edit your includes/config.php file to allow you to run queries.

Find:
PHP Code:
$config['SpecialUsers']['canrunqueries'] = ''; 
Replace With:
PHP Code:
$config['SpecialUsers']['canrunqueries'] = 'X'; 
X = Your userid
Reply With Quote
Old 06-13-2006, 08:15 AM   #4
Norman
Coder

Norman's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 ssssss242
Location: [Italy]
Norman is on a distinguished road
Send a message via MSN to Norman
Status: Offline Default
And if I am in a local forum I must put "127.0.0.1", right?
Reply With Quote
Old 06-13-2006, 11:00 AM   #5
Senna
Coder

Senna's Avatar

Activity Longevity
1/20 17/20
Today Posts
0/3 sssss1411
Location: LalaLand
Age: 32
Senna is on a distinguished road
Status: Offline Default
Quote:
Originally Posted by Norman
And if I am in a local forum I must put "127.0.0.1", right?
you need to enter your userid, most likely "1", as I suppose you are using the user that was created during the setup

your userid on this board is "7215"
Reply With Quote
Old 06-13-2006, 11:22 AM   #6
Norman
Coder

Norman's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 ssssss242
Location: [Italy]
Norman is on a distinguished road
Send a message via MSN to Norman
Status: Offline Default
Ahhhhh I understand! Thanks man!

Great!
Reply With Quote
Old 08-29-2007, 05:23 PM   #7
puta.mp3
vB Newbie

Activity Longevity
0/20 10/20
Today Posts
0/3 ssssssss1
puta.mp3 is on a distinguished road
Status: Offline Default
Screenshoots are missing...
Reply With Quote
Old 07-25-2008, 04:10 AM   #8
steponfrog
vB Newbie

Activity Longevity
0/20 7/20
Today Posts
0/3 ssssssss6
steponfrog is on a distinguished road
Status: Offline Default
Quote:
Originally Posted by puta.mp3 View Post
Screenshoots are missing...
I'll bet the code needs updating to work with vB3.7.x
Reply With Quote
Old 07-26-2008, 12:24 AM   #9
Michael Biddle
Staff
Michael Biddle's Avatar

Activity Longevity
1/20 18/20
Today Posts
0/3 sssss2818
Location: Anaheim
Age: 22
Michael Biddle is on a distinguished road
Status: Offline Default
Nope, should be the same with all vb 3.x
Support will only be offered through forums
Michael Biddle / vBHackers.com
vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for download now

vBSEO Google Sitemap Generator - Version 2.5 Released

Crawlability Network: vBulletin SEO | vBulletin Hackers
Reply With Quote
Old 07-30-2008, 05:29 AM   #10
steponfrog
vB Newbie

Activity Longevity
0/20 7/20
Today Posts
0/3 ssssssss6
steponfrog is on a distinguished road
Status: Offline Default
Quote:
Originally Posted by Michael Biddle View Post
Nope, should be the same with all vb 3.x
DOH! :grin:

Aaah, yes, because it's direct SQL on your MySQL... Sorry, I was in a different world; I though we were writing code for vB to commit SQL.

Sorry, my bad.
Reply With Quote

Reply

« [How to] Set User Titles | [HOW-TO] Backup/restore using phpMyAdmin/SSH »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Run vBulletin On your P.C. Ken Iovino vBulletin Modification Tutorials 83 11-02-2009 05:16 AM
[How To] Add Options per forum Ken Iovino vBulletin Modification Tutorials 10 03-03-2007 06:25 PM
[How To] Run a vb page outside of the forum directory Junior vBulletin Modification Tutorials 7 01-10-2007 10:05 PM
[How To] Make a basic cron job Nick R vBulletin Modification Tutorials 11 12-12-2006 09:09 PM
[How to] submit a press release Rex Growing Your vB Forum 1 06-19-2006 06:36 PM



All times are GMT. The time now is 05:34 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!