Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-16-2002, 03:12 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool

Satan
Reply With Quote
  #12  
Old 12-16-2002, 04:33 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Codename49
Here you go what you wanted:

UPDATE forum AS f1, forum AS f2, forum AS f3 SET f1.something = "value1", f2.something = "value2", f2.something = "value3" WHERE f1.forumid=first AND f2.forumid=second AND f3.forumid=third;
Not working:

Quote:
Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE forum AS f0, forum AS f1, forum AS f2, forum AS f3, forum AS f4, forum AS f5, forum AS f6, forum AS f7, forum AS f8, forum AS f9, forum AS f10, forum AS f11, forum AS f12, forum AS f13, forum AS f14, forum AS f15, forum AS f16, forum AS f17, forum AS f18, forum AS f19, forum AS f20, forum AS f21, forum AS f22, forum AS f23, forum AS f24, forum AS f25, forum AS f26, forum AS f27, forum AS f28, forum AS f29, forum AS f30, forum AS f31, forum AS f32, forum AS f33, forum AS f34, forum AS f35 SET f0.lastthreadtitle = 'Layout and Quicktime issu...', f1.lastthreadtitle = 'Use A String Value From W...', f2.lastthreadtitle = 'Save as target..more info', f3.lastthreadtitle = 'Feedback', f4.lastthreadtitle = 'help me.', f5.lastthreadtitle = 'Am doing some research on...', f6.lastthreadtitle = 'Cool web-editor...', f7.lastthreadtitle = 'Member of the Month (Octo...', f8.lastthreadtitle = 'Need new Vid Card...', f9.lastthreadtitle = 'Have fun ', f10.lastthreadtitle = '...and now Chit Chat is o...', f11.lastthreadtitle = 'I M IN A BAD MOOD! I WANT...', f12.lastthreadtitle = 'MSN! GRR!', f13.lastthreadtitle = 'Notating Time in a MySQL ...', f14.lastthreadtitle = 'CPU - Computer Power User', f15.lastthreadtitle = 'Scepter 17" moniter', f16.lastthreadtitle = 'Direct Connect Addendum.....', f17.lastthreadtitle = 'Visual Basic: Adding Func...', f18.lastthreadtitle = 'Case Modding Tutorial', f19.lastthreadtitle = 'Hosting Matters', f20.lastthreadtitle = 'Kedaman...your music?', f21.lastthreadtitle = 'Best way to store passwor...', f22.lastthreadtitle = 'DEADNESS!', f23.lastthreadtitle = 'Eminem - The Eminem Story', f24.lastthreadtitle = 'What software do you use?', f25.lastthreadtitle = 'new', f26.lastthreadtitle = 'Navigation bar \ No frame...', f27.lastthreadtitle = 'Wednesday, August 28, 200...', f28.lastthreadtitle = 'WEB DESIGNER/PROMOTER REQ...', f29.lastthreadtitle = 'Make Objects Circular...i...', f30.lastthreadtitle = 'Andy Z!', f31.lastthreadtitle = 'Member of the Month', f32.lastthreadtitle = 'Pages within Pages, step ...', f33.lastthreadtitle = 'Archive of Ripped Sites', f34.lastthreadtitle = 'Hosting Matters', f35.lastthreadtitle = 'Tucows Domain Name Regist...' WHERE f0.forumid = 3 AND f1.forumid = 6 AND f2.forumid = 8 AND f3.forumid = 11 AND f4.forumid = 12 AND f5.forumid = 13 AND f6.forumid = 16 AND f7.forumid = 18 AND f8.forumid = 28 AND f9.forumid = 34 AND f10.forumid = 38 AND f11.forumid = 39 AND f12.forumid = 49 AND f13.forumid = 53 AND f14.forumid = 54 AND f15.forumid = 57 AND f16.forumid = 58 AND f17.forumid = 59 AND f18.forumid = 60 AND f19.forumid = 62 AND f20.forumid = 64 AND f21.forumid = 67 AND f22.forumid = 77 AND f23.forumid = 78 AND f24.forumid = 84 AND f25.forumid = 85 AND f26.forumid = 86 AND f27.forumid = 87 AND f28.forumid = 88 AND f29.forumid = 89 AND f30.forumid = 93 AND f31.forumid = 94 AND f32.forumid = 95 AND f33.forumid = 96 AND f34.forumid = 97 AND f35.forumid = 98
mysql error: You have an error in your SQL syntax near 'AS f0, forum AS f1, forum AS f2, forum AS f3, forum AS f4, forum AS f5, forum AS' at line 1

mysql error number: 1064

Date: Monday 16th of December 2002 01:28:15 PM
Script: http://localhost:8082/web/testvb/rep...adtitlecache=1
Referer:
Reply With Quote
  #13  
Old 12-16-2002, 04:35 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just remembered: you can't update multiple tables at once. So at this rate I'd have to use 36 queries (!) or some other method.
Reply With Quote
  #14  
Old 12-16-2002, 04:42 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh good to know

have you tested my suggestion?
perhaps this works..
Reply With Quote
  #15  
Old 12-16-2002, 04:42 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Investigating...
Reply With Quote
  #16  
Old 12-16-2002, 05:18 PM
okrogius okrogius is offline
 
Join Date: Dec 2001
Location: USA
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah. I knew this type of query worked wonders on shortening selects but didn't actually test it on an update. Sorry to hear it doesn't work.
Reply With Quote
  #17  
Old 12-16-2002, 05:19 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[n00b mode]
XENON YOU'RE A GENIUS!
[/n00b mode]
It worked. The query took relatively long to execute (~1 sec) but this will be a cron'ed script anyway

Thanks
Reply With Quote
  #18  
Old 12-16-2002, 05:20 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Codename49
Ah. I knew this type of query worked wonders on shortening selects but didn't actually test it on an update. Sorry to hear it doesn't work.
IIRC multiple tables are supported in MySQL 4 but since practically nobody uses it (including myself) I want to steer clear of it
Reply With Quote
  #19  
Old 12-16-2002, 05:22 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good to hear it works
you're welcome

have you compared the running time with the added time of 36 single queries?
i think it's faster but don't know exactly..
Reply With Quote
  #20  
Old 12-16-2002, 05:23 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It probably is faster but just the concept of using that many is pretty bad IMO.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 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.05566 seconds
  • Memory Usage 2,255KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete