![]() |
Custom Queries with parameters
Custom Queries - version 1.02
================================================== ======================== Hack: Custom Queries Version: 1.02 vB Version: 3.5.0 RC3 Author: MarcoH64 Description: This hack will let you store SQL-statements that you use more then once in the database for later use. You can see it as an extension the the standard predefined queries, but now you can define your own, use parameters and parse TABLE_PREFIX. Features: - Store SQL-statements for later use - Use any number of parameters in your SQL-statements - Query execution is done by standard vB scripts, so normal vB security is active on them. - Full Admin Help (needs to be installed seperate) - Can handle TABLE_PREFIX - Quick Query for executing 1 time queries (including TABLE_PREFIX parsing) - Import/Export groups of safed Queries Donations are always welcome to Paypal: marcoh64 @ gmail.com Change log: v1.02 (18-9-2005) - Added 'groupname' for queries. (used when exporting queries) - Export Queries to an XML-File - Import Queries from XML-File - Direct safe Quick Query v1.01 (16-9-2005) - Parse TABLE_PREFIX - Added Quick Query - Added TABLE_PREFIX to install code v1.00 (13-9-2005) - Update: Admin help was not in product xml-file, see readme.txt ================================================== ========================= Installation: - Upload all files from the upload directory to your forumhome directory. - Install the product XML-File - If Admin Help is wanted, also upload the file mh_cq-adminhelp.xml in your Admin Help Manager (only accessible in debug mode, or by going to www.myboard.com/admincp/help.php?do=files) ================================================== ========================= When using parameters in a query, you can use the parametername surrounded by brackets (ie. {parametername}) in the SQL-statement. Example: Parametername: username Query: SELECT * FROM user WHERE username LIKE '%{username}%' Attached is also an example export file with a demo query. |
Very nice, although I don't think I have a use for this (yet).
Thanks for sharing Marco! :) |
booboo? LOL
Just what I was looking for. ;) |
Update: Admin Help was not in productfile, see readme.txt on how to fix (just upload the adminhelp.xml file into the Admin Help Manager)
|
my dream would be to be able to just have the " . TABLE_PREFIX . " element parsed by this SQL manager... would be simplier for all copy/pastes!
|
Quote:
[high]* Marco van Herwaarden makes a note to fix that tomorrow.[/high] Hmm parsing table prefix could be done easily, will have a look. Although my hack is more for queries that are run more then once, not for 1 time queries. You can see it as extending the buildin predefined queries with your own, plus that you can use parameters on them. |
Quote:
|
Lol, here i go again, what started as an idea for a small simple plugin that would let you add your own queries to the predefined list (which wasn't possible since there are no hooks in that file) seems to be growing into something bigger then i ever intended. And i already have so many ideas for my existing hacks that i still need to finish.
But with only 1 install, i don't think i need to put too much work in this. ;) |
Thanks alot, buddy! ;)
|
Quote:
[/high] but you can count me in... i can even add some more requests on ALL your hacks MarcoH64! (that 64 remembers me of a certain Commodore!) |
New version released
Change log: v1.01 (16-9-2005) - Parse TABLE_PREFIX - Added Quick Query |
Quote:
|
How about this?
Use descriptions to describe what the query is for and list it on the main page next to the query title. And then have a Notes variable (and link) that will allow you to add any notes on parameters used or anything like that. ;) Can I get someone esle to agree to this as I was told it might be done with another person wanting the same thing? ;) |
Version 1.02 released:
Change log: v1.02 (18-9-2005) - Added 'groupname' for queries. (used when exporting queries) - Export Queries to an XML-File - Import Queries from XML-File - Direct safe Quick Query I will try to update the screenshots tomorrow. PS If someone create some awesome queries, feel free to export and share them in here. If you want i will link them in the first posts. |
Screenshots updated
(Sigh they don't stay in original order) |
Nice job Marco :)
And I am curious at the queries people store. Perhaps the generic ones could be posted here :) |
Thanks Floris,
Have even ideas for expanding this one, but since i am a bit short on time lately, id din't have the chance yet (also because it didn't get as much installs as i expected). Yes posting some queries here has also crossed my mind, and i still plan to create a first set myself of common queries. |
hello will it works for vb3.5.2
Obiviously it should reduce page loading time...i think.. Am i right ?? Thanks |
Quote:
Quote:
|
Quote:
an forum home page need 24 sql qery to open.. now using this hack if sql query reduced to 16 .. should the page will load bit faster than before? Should it?? Pls let me know.. Hope u wont mind to describe some more about this one..controle/rreduce sql query..what good result it will bring... Thanks |
This hack has nothing to do with queries executed on pages, not does it in any way influence pageloads.
In vBulletin you have the option to run some predefined queries from the AdminCP. This hack let you define your own queries to be run manually. I don't understand what in the hacks description make you think this got anything to do with queries run when a page load. |
works it for vb3.6? (3.6.3)
Thank |
Quote:
|
Will this work on 3.7.1?
|
Yes, it works fine!
|
Thank you, sir. ;)
|
Work on 3.8.*?
|
I see no reason why it should not work on any 3.5 or higher version.
|
Quote:
Thank you Marco, this mod is simple, i use not much, but for query fast, without open phpMyAdmin or shell is very useful and allow of to remember easily the query more used :up: |
No there is a little problem, export not work but i found solution
edit file mh_cq.php PHP Code:
PHP Code:
|
All times are GMT. The time now is 03:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|