View Full Version : Run Query?
How do I do that? :nervous:
Dean C
10-04-2004, 09:22 PM
You can find a lot out just by reading the manual ;)
http://www.vbulletin.com/docs/html/maintenance_query
Borgs8472
10-04-2004, 09:54 PM
You'll have to log onto your SQL manager. It's scary for newbie. Just do what the hacks tell you and don't press any other buttons....
Cheezes! I think I'll just use the modules that don't require any Run Query. :surprised:
Thanks for you're help!
peterska2
10-05-2004, 10:53 AM
You can edit your config.php file to allow you to run queries directly from your ACP. This is the way that I usually do it.
Find the line that says $canrunquery = '' and add your userid number between the ''.
Then in your ACP in the Maintanence section you will see a section entitled 'Execute SQL Query' Go into there and simply put the query text that you have been given into the box that comes up. Keep clicking OK on each step. If there is any problems it tells you.
I don't think you will find many mods that don't involve extra queries as they all require different things.
Sweet! I'll try it. Thanks peterska2! :D
Yahoo, you are the best peterska! *jumping up and down*
Xenon
10-05-2004, 03:58 PM
more help on that topic:
-
peterska2
10-05-2004, 04:05 PM
Yahoo, you are the best peterska! *jumping up and down*
* peterska2 takes a bow
Your welcome :)
Here I am again. :nervous:
I'm going to install Who was online today-mod, and I have to run query.
This is what the textfile says
******************************
RUN THIS QUERY (IF YOU HAVEN'T RAN
THE INSTALLER.PHP FILE BEFORE)
******************************
INSERT INTO datastore (title, data) VALUES ('todaymaxonline', 'a:2:{s:14:\"todaymaxonline\";i:1;s:18:\"todaymaxonlinedate\";i:1070000000;}')
"RUN THIS QUERY".. What query? "Insert into datastore.." etc?? Is that the query? Oh dear lord, I don't know why I even bother to try, I'm not cut out for this. :(
This is the query:
INSERT INTO datastore (title, data) VALUES ('todaymaxonline', 'a:2:{s:14:\"todaymaxonline\";i:1;s:18:\"todaymaxonlinedate\";i:1070000000;}')
Note that if you use table prefixes, you will have to make sure the table name is correct (in this case 'datastore' is our table name). So if my table prefix is vb3_, then the query would need to be changed to:
INSERT INTO vb3_datastore (title, data) VALUES ('todaymaxonline', 'a:2:{s:14:\"todaymaxonline\";i:1;s:18:\"todaymaxonlinedate\";i:1070000000;}')
Don't know your table prefix or if you are even using one? You can find out what it is by looking at config.php at this line:
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = 'vb3_';
This is what I found in config.php:
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = '';
So I guess I'm not using table prefix, then.
*hurries back to run query*
Thanks Brad.loo!
This is what I found in config.php:
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = '';
So I guess I'm not using table prefix, then.
*hurries back to run query*
Thanks Brad.loo!
Correct, the query should run fine without modification :)
Almost doen, only have one more thing to do.
******************************
NOW CREATE THE FOLLOWING PHRASES:
******************************
last_online_at_x / Last online at {1}
******************************
active_users_today / Number of Active Users Today
******************************
most_users_ever / Most users ever online on a day was {1} on {2}.
******************************
already_visited_today / The following members have already visited the forums today
******************************
Where do i create theese phrases?
And one more thing, the PHPfile, onlinetoday.php, where does that go? :ermm:
Colin F
10-05-2004, 06:50 PM
I assume the onlinetoday.php file should go in the root directory of your forum.
You can add phrases by going to your:
Admin CP > Languages & Phrases > Phrase Manager > Add New Phrase
Most likely onlinetoday.php would be uploaded to the forum directory, or the same directory that your showthread.php file is in.
You add phrases via your admin cp, in the navigation frame find 'Languages & Phrases', click on 'Phrase Manager'.
A new page will open up, at the bottom there should be a button labled 'add phrase', click it.
This will bring you to the a new screen, add the phrases like this:
Varname: last_online_at_x
Text: Last online at {1}
Ah, of course! *blush* But the phrases comes up as Not allowed, 'cause it's duplicates. Example: There is already a phrase named 'last_online_at_x'. You may not create duplicate names.
That means it is already added to the database, did you run some sort of installer script with that hack?
Try adding the rest of the phrases by hand, if they all return that error then just skip that step of the instructions.
Wooha! I did it! Thank you so much for all help! :banana:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.