vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Auto move threads to archive forum after x days (https://vborg.vbsupport.ru/showthread.php?t=74772)

The Realist 01-22-2005 10:26 PM

One thing I've noticed is this.

It moves the closed stickies as well?

Can it have options in the code so we can specify what sections not to move closed posts from. We dont want staff or stickies moving to an open forum do we.

Laters

Bison 01-23-2005 12:44 AM

Quote:

Originally Posted by The Realist
One thing I've noticed is this.

It moves the closed stickies as well?

Can it have options in the code so we can specify what sections not to move closed posts from. We dont want staff or stickies moving to an open forum do we.

Laters

PHP Code:

$DB_site->query("
            UPDATE " 
TABLE_PREFIX "thread 
            SET forumid = 
$newforum 
            Where lastpost <= 
$movedate
            AND forumid != 
$newforum
            AND sticky != 1
        "
); 


The Realist 01-23-2005 10:17 AM

This would stop the stickies being moved yes?

Quote:

Originally Posted by Bison
PHP Code:

$DB_site->query("
            UPDATE " 
TABLE_PREFIX "thread 
            SET forumid = 
$newforum 
            Where lastpost <= 
$movedate
            AND forumid != 
$newforum
            AND sticky != 1
        "
); 



trafix 01-23-2005 10:19 AM

yep i didnt take stickies into concideration ... good job :)

The Realist 01-23-2005 10:28 AM

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 10
STR: ->
SQL: $DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET forumid = $newforum
Where lastpost <= $movedate
AND forumid != $newforum
AND sticky != 1
")

trafix 01-23-2005 10:30 AM

ahhh ... ooops

should be
PHP Code:

$DB_site->query(
UPDATE " 
TABLE_PREFIX "thread 
SET forumid = 
$newforum 
Where lastpost <= 
$movedate 
AND forumid != 
$newforum 
OR sticky != 1 
"
); 


The Realist 01-23-2005 10:32 AM

Still the same M8 :)

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 10
STR: ->
SQL: $DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET forumid = $newforum
Where lastpost <= $movedate
AND forumid != $newforum
OR sticky != 1
")

trafix 01-23-2005 10:44 AM

Ummm i just tested that code on my dev forum and it ran without an error ..... im confused

The Realist 01-23-2005 10:49 AM

I'll run it again.

The Realist 01-23-2005 10:51 AM

Same error.

Im using phpmyadmin to run the query.


All times are GMT. The time now is 09:51 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.01158 seconds
  • Memory Usage 1,743KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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