vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Is this query "proper" for 3.6.x? (https://vborg.vbsupport.ru/showthread.php?t=128498)

BigJohnny 10-07-2006 02:04 PM

Is this query "proper" for 3.6.x?
 
I have this query in one of the plugins, this code came from a product for 3.5.3, and im wondering if this is still ok for 3.6, or if there is an updated way to do what this query is doing.

$db->query_first

And

$vbulletin->db->query_write

Thanks :)

BigJohnny 10-09-2006 10:47 PM

noone can tell me if this needs to be updated or not?

Adrian Schneider 10-09-2006 10:56 PM

Yep...

query_first() to fetch first row
query_first_slave() for fetching first row using slave server (if available)
query_read() for reading
query_read_slave() for reading using slave server (if available)
query_write() for writing to the database

Your best bet is to just dig into the class files to find this stuff out... It just takes a sec.

./includes/class_core.php

Paul M 10-09-2006 10:56 PM

Erm, well the answer to his question is "no", neither of the two queries he posted needs to be changed.

Adrian Schneider 10-09-2006 11:00 PM

lol, well in my defence I could say I was answering post #2

Thanks for catching my typo, Paul, though the two _slave() functions were added.

BigJohnny 10-10-2006 03:11 AM

i dont know what id be looking for in the class files.
:)
thanks for thei nfo

hotwheels 10-10-2006 03:34 PM

Quote:

im wondering if this is still ok for 3.6
yes, for the most part......Some of the write's within the actual query changed, so if you are trying to upgrade a certain mod by yourself, you may run into trouble if the field isn't present anymore......This has been a learning curve i have been going through too........

BigJohnny 10-10-2006 10:49 PM

well i havent gotten any errors, i was just wondering cause i remember reading something about vbulletin using clean_gpc now or something??

what would tneed to be replaced by clean_gpc?

Guest190829 10-10-2006 10:51 PM

Quote:

Originally Posted by BigJohnny
well i havent gotten any errors, i was just wondering cause i remember reading something about vbulletin using clean_gpc now or something??

what would tneed to be replaced by clean_gpc?

The query function and clean_array_gpc are separate functions.

clean_array_gpc sanitizes functions, while the query functions run queries to the database.

If you are looking at porting an older modification you would be replacing vBulletin's legacy globalize() function with $vbulletin->input->clean_array_gpc()


All times are GMT. The time now is 08:00 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.01107 seconds
  • Memory Usage 1,726KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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