The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Execute SQL queries - Is there a demo on what it can do?
Is there a manual, cheat sheet, or training manual that shows you different things you can do with Execute SQL Queries? I'm such a noob, that I want to just try a couple different command that I know people have done just to see the results.
I have already enable the SQL in the confib.php file. ---------------------------- I have added this in case someone else search for information like I am.... To execute SQL queries from the ACP you need to add a number ?1? to the config.php and the config.php.new (I don't know the different between them)? This is located at: /public_html/includes Under Config.php and config.php.new You should see this: // ****** USERS WITH QUERY RUNNING PERMISSIONS ****** // The users specified here will be allowed to run queries from the control panel. // See the above entries for more information on the format. // Please note that the ability to run queries is quite powerful. You may wish // to remove all user IDs from this list for security reasons. $config['SpecialUsers']['canrunqueries'] = ''; (NOTE THAT IS TWO SINGLE ') Just add your userid to the canrunquesties. You can find your userid by going to your member list and search for your name. Here is an example: http://www.myforum.com/member.php?u=1 The 1 after the u is your userid. In this case 1 So you would put a 1 between the '' 'SpecialUsers']['canrunqueries'] = '1'; That's it.... |
#2
|
||||
|
||||
I don't understand what you want. You can run any sql query there - there is no list of which you may run. There are some predefined ones in the dropdown though.
|
#3
|
|||
|
|||
Lynne,
I'm a dork as far as how to do thinks like running SQL. What I was wondering is where you can find different querries that you can run in a SQL vbulletin query. Example: Suppose I told you to go replace the right oxygen sensor on my 93 Corvette. Could you? No, because you have never been taught how to do it. Now if you had a book that showed the steps to find the oxygen sensor, and what was needed, then you could probably do it, or, if I showed you once then you would be able to do it..... So is there any books (written with vbullentin in mind), that will say "Type "ls -ltr" in the block to list the directory, in the long view style, and make it in date/time order. (That is actually a UNIX command). Just samples of things you can do to understand what you're doing with SQL (from the vbulletin point of view). |
#4
|
||||
|
||||
I believe there actually is some book written with vbulletin in mind, but I can't recall what it's called and I have no idea what is in it. You can search amazon.com for it. Other than that, I know there are some queries posted in a few threads over in the vb.com Tips forum to do some common things, but otherwise you just need to take a look at the database, see the fields you want to select, then read up on how to write a mysql query to pull those fields for yourself.
And yes, you are right, I would have no idea how to replace the oxygen sensor on a 93 corvette. Now, an 86 corvette would perhaps be a different story..... |
#5
|
|||
|
|||
Quote:
Thanks Lynne... I'm a person that like to try the basic and understand then before I screw up my forum. Thanks for the response, and motor on!.... |
#6
|
|||
|
|||
Quote:
Some examples you could run include: [SQL]SELECT * FROM thread WHERE threadid = '5'[/SQL] This will select everything from the thread table, where threadid = 5 [SQL]SELECT username FROM user WHERE userid = '1'[/SQL] This will select the username of a user where his/her's userid = 1 [SQL] UPDATE user SET email = 'fakeemail@fake.com' WHERE userid = '5'[/SQL] This will set a users email address to fakeemail@fake.com where their userid = 5 |
#7
|
||||
|
||||
Quote:
Be careful testing out any new found mysql skills. If you make a query that will give back too many results, or that is too 'complicated', or where you get stuck in an endless loop, etc., you could lock up your table and cause site problems. (Been there, done that!) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|