vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Whats wrong with this query? (https://vborg.vbsupport.ru/showthread.php?t=157770)

Xplorer4x4 09-13-2007 07:38 PM

Whats wrong with this query?
 
Can some one tell me whats wrong with this query?
PHP Code:

$db_site->query("UPDATE " TABLE_PREFIX "setting SET value='' WHERE varname='cookiedomain'");
$db_site->query("UPDATE " TABLE_PREFIX "setting SET value='/' WHERE varname='cookiepath'"); 


Eikinskjaldi 09-13-2007 09:17 PM

Nothing. It's perfect in every way.

Farcaster 09-13-2007 09:18 PM

Shouldn't it be using, $db->query_write ?

Eikinskjaldi 09-13-2007 09:23 PM

Quote:

Originally Posted by Farcaster (Post 1338592)
Shouldn't it be using, $db->query_write ?

Only for code style issues. ->query still works. Of course down the track vb may change its mind on that, and make query unavailable.

Paul M 09-13-2007 10:02 PM

Quote:

Originally Posted by Farcaster (Post 1338592)
Shouldn't it be using, $db->query_write ?

Yes.

Query should not be used at all, either for reading or writing.

Code:

* @deprecated        Deprecated as of 3.6. Use query_(read/write)

Xplorer4x4 09-14-2007 02:14 AM

Quote:

Originally Posted by Farcaster (Post 1338592)
Shouldn't it be using, $db->query_write ?

PHP Code:

$db->query_write("UPDATE " TABLE_PREFIX "setting SET value='' WHERE varname='cookiedomain'");
$db->query_write("UPDATE " TABLE_PREFIX "setting SET value='/' WHERE varname='cookiepath'"); 

So is this the correct way?

Chris M 09-14-2007 02:19 AM

Yes that is correct :)

Chris


All times are GMT. The time now is 03:15 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.00947 seconds
  • Memory Usage 1,725KB
  • 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)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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