Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Queries with parameters Details »»
Custom Queries with parameters
Version: 1.02, by Marco van Herwaarden Marco van Herwaarden is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Version: 3.5.8 Rating:
Released: 09-12-2005 Last Update: 09-17-2005 Installs: 12
DB Changes Uses Plugins
Additional Files  
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-16-2005, 06:52 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

New version released
Change log:
v1.01 (16-9-2005)
- Parse TABLE_PREFIX
- Added Quick Query
Reply With Quote
  #13  
Old 09-17-2005, 11:26 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
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!
Your dream has come true, so what are you waiting for.
Reply With Quote
  #14  
Old 09-17-2005, 12:11 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #15  
Old 09-18-2005, 06:35 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 09-18-2005, 07:00 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshots updated

(Sigh they don't stay in original order)
Reply With Quote
  #17  
Old 10-27-2005, 11:11 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice job Marco

And I am curious at the queries people store. Perhaps the generic ones could be posted here
Reply With Quote
  #18  
Old 11-09-2005, 02:26 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 12-31-2005, 02:05 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello will it works for vb3.5.2
Obiviously it should reduce page loading time...i think..
Am i right ??

Thanks
Reply With Quote
  #20  
Old 12-31-2005, 05:48 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia
hello will it works for vb3.5.2
Yes it should work for 3.5.2
Quote:
Originally Posted by Zia
Obiviously it should reduce page loading time...i think..
I am sorry, but i don't understand what this hack has to do with pageloads?
Reply With Quote
  #21  
Old 12-31-2005, 09:24 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Yes it should work for 3.5.2
I am sorry, but i don't understand what this hack has to do with pageloads?
truly....im thinking...if sql query qty reduced....say:
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
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 06:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05481 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete