Archaniel
Forum Replies Created
-
Well the thing is, if I remove the group-by, it works like a charm. $where is created in some complex manner (which I didn’t look much into)
In the listing, there are 3 SQL queries performed with following $where statements. I can’t see any error there (as it doesn’t limit anything) and basically “group by” should take the FIRST occurence of the record
following are the where conditions for statements executed after a click for “all events”
string(241) ” WHERE (
recurrence!=1 ORrecurrenceIS NULL) AND ( event_start_date >= CAST(‘2013-08-30’ AS DATE) OR (event_end_date >= CAST(‘2013-08-30’ AS DATE) AND event_end_date != ‘0000-00-00’ AND event_end_date IS NOT NULL)) AND (event_status=1)”string(241) ” WHERE (
recurrence!=1 ORrecurrenceIS NULL) AND ( event_start_date >= CAST(‘2013-08-30’ AS DATE) OR (event_end_date >= CAST(‘2013-08-30’ AS DATE) AND event_end_date != ‘0000-00-00’ AND event_end_date IS NOT NULL)) AND (event_status=1)”string(241) ” WHERE (
recurrence!=1 ORrecurrenceIS NULL) AND ( event_start_date >= CAST(‘2013-08-30’ AS DATE) OR (event_end_date >= CAST(‘2013-08-30’ AS DATE) AND event_end_date != ‘0000-00-00’ AND event_end_date IS NOT NULL)) AND (event_status=1)”Well I looked more into it, I made an external script which synchronized all bookings across all recurring events. It was called every minute and it kinda hanged the sql server up. Now it stopped (I’ve switched to manual sync)
Anyway, I still look for a possibility to display only “upcomming” event from a recurring list. This is atm not possible 🙁
my solution was about:
$sql = apply_filters('em_events_get_sql'," SELECT $selectors FROM $events_table LEFT JOIN $locations_table ON {$locations_table}.location_id={$events_table}.location_id $where". ( (is_admin() || $dev)? '' : ' GROUP BY event_name ' ). " $orderby_sql $limit $offset ", $args);and in the count:
if (!is_admin() || $dev) { $rtemp = $wpdb->get_results( str_replace('COUNT(*)',$events_table.'.post_id',$sql), ARRAY_A); return sizeof($rtemp); }when $dev = false, the changes kick-in
sadly, it shows not the all-first event from the recurring set, but only the second.
I have no idea how to force it to display the first. Any ideas for a switch?Basically there are roughly 400 events generated (as each recurring is created as one event)
And yes, it’s happening when listing a category – doesn’t matter if it’s in backend (management) or frontend – just a listing.But the listing of ALL events takes basically no time. I don’t understand it. Do you do some kinde of GROUP by in the statement which just consumes so much time?
Forum: Plugins
In reply to: Poll-option like contest pluginNah, I recoded the wp-polls option quite much to get the functionality into it.
I can share the modified plugin (it’s rather dirty made though)Forum: Fixing WordPress
In reply to: Categories not showing upcategories seem to be messed up. Mine ain’t showing up in admin menu on a clean install
What about another theme ?Forum: Fixing WordPress
In reply to: How to disable ALL comments.… in case you’ll struggle:
UPDATE wp_posts SET comment_status='closed' WHERE post_date<'2011-05-01 00:00:00'Forum: Fixing WordPress
In reply to: Import automatization scriptForum: Themes and Templates
In reply to: IE9 / FF4 / Safari template acting weirdlyprobbably found the problem
it was the leading blank space in header.
I don’t understand it 🙁