[Fwd: Re: [EventCalendar] Column 'category_id' in where clause is ambiguous]

Jürgen Bäckmann postmaster at baeckmann.com
Mon Feb 12 21:59:28 UTC 2007

Hi David,

this ist a bug in Eventcalendar 3.1 when using Wordpress 2.1.

So, I build a workaround which works for me. It's not nice but it works.
So I changed eventcalendar3.php
(look around line 210:)

     if(!$ec3->is_category): // Force it to be a listing.
       $where.=" AND ec3_post2cat.category_id=$ec3->event_category ";
       // [Begin Workaround] Remove first Category match
       $sqlreplace = "category_id IN (".$ec3->event_category.") AND";
       $where = str_replace( $sqlreplace, "", $where );
       // [End Workaround]



David Bessler schrieb:
> WordPress database error: [Column 'category_id' in where clause is
> ambiguous]
> SELECT SQL_CALC_FOUND_ROWS nycvs_posts.* FROM nycvs_posts LEFT JOIN
> nycvs_post2cat ON (nycvs_posts.ID = nycvs_post2cat.post_id) LEFT JOIN
> nycvs_post2cat ec3_post2cat ON ec3_post2cat.post_id=id WHERE 1=1 AND
> category_id IN (15) AND (post_type = 'post' AND (post_status = 'publish'
> OR post_status = 'private')) AND ec3_post2cat.category_id!=12 GROUP BY
> nycvs_posts.ID ORDER BY post_date DESC LIMIT 0, 100
> Just upgraded to php 5.0.4  and now I get this error.  I deactivate all
> plugins except EC3, and it still happens.   When I deactivate EC3 it
> goes away.  I need help.
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar

More information about the EventCalendar mailing list