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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2006, 01:44 PM
websissy websissy is offline
 
Join Date: Sep 2003
Location: Socorro, NM USA
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I need calendar sorting advice, please?

I'm webmaster for an online and paper publication here in New Mexico, USA. I'm good with most stuff, but I'm NOT a MYSQL expert.

For several months we've had a project going to greatly expand the number of events featured in our vBulletin calendar. We've been successful with that... beyond my wildest dreams. Therein lies the root of my dilemma. Our Calendar now contains over 2,100 future events and it's growing FAST!

Our sitewide calendar features events from 40+ communities around our state. So, as part of our calendar expansion strategy, I asked the lady who was researching and adding calendar events to make sure that each event title begins with the community name followed by a colon as in - Albuquerque:, Las Cruces:, Santa Fe:, etc.

My plan was to sort the events for each day by the name of the city within our calendar so that the events for each date would be listed by community within day. A week ago I tried making that change by adding an "order by title" clause to the calendar query that appears in functions_calendar.php At first, the change seemed to work fine.

However, on close examination of the events on some days, I realized that although the list of events does get sorted and for a while everything is in sequence. The list is NOT always in full alphabetical order. For the life of me, I can't figure out why. But on days with many events in the list, the list will almost always have a few events at the end that seem to have been ignored by the sort.

The web address for the site is: Our Home Page (that's a synonym for the licensed vbulletin domain name which is much longer). Our events the calendar can be found at: Steppin Out Calendar.

If you look close at the list of events for September 9th, you'll see what is happening. It begins with an event whose title starts with "P" followed by 2 events with titles beginning with "T". Then it starts over again with events whose titles begin with A's and runs through a long list of events in exact alphabetical order and then it inexplicably starts OVER again with the A's and runs through yet another list of events in Alphabetical order.

Can anyone give me a CLUE what is happening here? I swear to GOD the only change I made to that query in functions_calendar.php was to add the words "ORDER BY event.title" to the select statement. Here's the actual code block involved:

Code:
                WHERE calendarid = $calendarinfo[calendarid] AND
                        ((dateline_to >= $beginday AND dateline_from < $endday) OR (dateline_to = 0 AND dateline_from >= $beginday AND dateline_from <= $endday )) AND
                        visible = 1
                ORDER BY event.title
How can that single simple change possibly produce such insane results???

Thanks!

PS. If this event needs to be MOVED, feel free to do so, but please leave a link behind here so that I can find it. Thanks!
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 10:25 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.03239 seconds
  • Memory Usage 2,159KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete