vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Administrative and Maintenance Tools - MyQueries - Save custom SQL for future use (https://vborg.vbsupport.ru/showthread.php?t=210897)

jesus likes pie 04-10-2009 10:00 PM

MyQueries - Save custom SQL for future use
 
1 Attachment(s)
My Queries by Rafael Lopez
04/10/2009 (m/d/y)

This mod allows you to store custom queries for later use. Simply define the query once, save it, and it'll appear under "Automatic Queries" in the
Admin CP - allowing you to run it again in a matter of seconds.

::: CHANGE LOG :::
v1.0 - original release
v2.0 - 4/12/09
-----New feature: Variables
-----A few bug fixes
v2.1 - 4/20/09
-----Saved queries can now be edited.


::: Installation :::

Extract product-my_queries.xml
Upload product-my_queries.xml by going to ADMIN CP --> PLUGINS AND PRODUCTS --> MANAGE PRODUCTS --> ADD/IMPORT PRODUCT
If you are upgrading then you should set "over-write" to yes.

And you're done!


https://vborg.vbsupport.ru/external/2009/04/28.png

As always with my releases, you are free to modify, distribute, derive work from, and translate this mod.

If you liked this mod you might also like my others:

Select Postbit [https://vborg.vbsupport.ru/showthread.php?t=203324]
Shared Admin Notes [https://vborg.vbsupport.ru/showthread.php?t=203326]
Internal Forums Closed Message/Reason [https://vborg.vbsupport.ru/showthread.php?t=207855]
Auto-Moderate Evading Banned Members [https://vborg.vbsupport.ru/showthread.php?t=207966]
Multi-Quote / Edit Integration [https://vborg.vbsupport.ru/showthread.php?t=210620]

Jasem 04-11-2009 02:57 AM

Nice work, thank you!

Installed

veenuisthebest 04-11-2009 04:27 AM

Quote:

Originally Posted by Jasem (Post 1788650)
Nice work, thank you!

Installed

man you have the same two lines posted in almost all threads LOL. Do you really install everything?

Hornstar 04-11-2009 11:03 AM

can only admins that have can run query permission run these? It looks like a useful mod, thanks for sharing.

ahmed-samara 04-11-2009 11:08 AM

wooow it's nice work ...i will try now :)

Ops !

PHP Code:

MySQL Error   You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1350' at line 6
Error Number  
1064 


ArnyVee 04-11-2009 11:15 AM

For those of us that are not so familiar with some of the backend functions like queries, could you explain what this would do or help us in doing? :)

Sweeks 04-11-2009 11:18 AM

I think this would be great if there was some preset sample queries added to the text file for us to use :) Like one for deleting visitor messages of X user etc :)
________
Fix ps3

jesus likes pie 04-11-2009 11:31 AM

Quote:

Originally Posted by hornstar1337 (Post 1788820)
can only admins that have can run query permission run these? It looks like a useful mod, thanks for sharing.

It is integrated directly into the query page, so it will be hidden from admins who do not have that permission.

Quote:

Originally Posted by ahmed-samara (Post 1788826)
wooow it's nice work ...i will try now :)

:)

Quote:

Originally Posted by ArnyVee (Post 1788828)
For those of us that are not so familiar with some of the backend functions like queries, could you explain what this would do or help us in doing? :)

Queries allow you to make mass-changes by running code. It's relatively advanced and has the potential to completely ruin your forum if you make a slip. With that said, most syntax errors end up with an error message which simply doesnt execute the query.

The query page already has examples. Like you could run a query to make everyone on your forum use the WYSIWYG editor. Or, like the person below you stated, you could run a query to delete ALL visitor messages of a specific user.

Things like that.

Quote:

Originally Posted by Sweeks (Post 1788830)
I think this would be great if there was some preset sample queries added to the text file for us to use :) Like one for deleting visitor messages of X user etc :)

This is functionality that will be added shortly. At the moment the example you gave wouldn't work well because that query would require a WHERE clause of something like

WHERE userid = 123

I'll be adding something to add "variables" to saved queries and so when you save a query you define the above as

WHERE userid = {userid}

and then you add "userid" as a variable, and then when you run the query vBulletin will ask you to fill in the variable "userid" to which you would enter "123".

Long answer short: right now this, could, for example reset everyone's invitations to whatever number you wanted. (Obviously this would require the invitation mod).

The key is that as it works at the moment, it can run any query which affects ALL users.

Sweeks 04-11-2009 11:32 AM

I cant wait for this added functionality, things like deleting all users private messages etc would be awesome too. Great work :)
________
LOW COST VAPORIZER

ahmed-samara 04-11-2009 02:04 PM

what about my problem :)
PHP Code:

MySQL Error   You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1350' at line 6
Error Number  
1064 



All times are GMT. The time now is 12:43 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
  • Page Generation 0.03242 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete