vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Change Queries or Add New Ones, Which is Better? (https://vborg.vbsupport.ru/showthread.php?t=83012)

amykhar 06-13-2005 01:39 PM

Change Queries or Add New Ones, Which is Better?
 
The one thing I'm finding is that so many of my hacks modify existing queries in order to save additional queries, that I'm stuck modifying source files.

Do you think it would be better to do additional queries rather than modifying existing ones?

For example, lets say I add a field to the thread table. Would it be philosophically a better idea for me to leave the existing insert query alone and then do an update query in my plugin to update the field?

This means I can make the mod with no source code mods, but it does add a query.

Or, am I going to be stuck releasing two versions? One as a plugin with updates and the other as a resource-conserving code mod?

Amy

Andreas 06-13-2005 01:45 PM

I am currently working on the "query problem".

My idea is to replace all current queries with a Query-Class that constructs the real query String at runtime, and assigns each query a unique identifier.
When this is done and it works out the way I'l like it to be, it will be possible to modify any existing query with a standard interface.

Reeve of shinra 06-13-2005 01:59 PM

Kirby's solution would be great but short of that, Its better to make a more optimized add-on. If you added 10 misc plugins that all added 1 addtional query to the forum home page, or to every thread, that would really jinx things up.

fraghappy 06-14-2005 12:58 PM

This is why everyone who is the admin of a modded board (and not a coder themselves) should familiarize themselves with PHP enough that they can consolidate plugins. 1 query really isn't going to make THAT big of a difference, but you'd be surprised how fast those suckers can pile up.


All times are GMT. The time now is 10:01 PM.

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.00918 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete