[EventCalendar] query_posts for category generates error"'category_id' in where clause is ambiguous"

Alex Tingle alex at firetree.net
Sat Oct 21 18:46:40 UTC 2006


Jake,

Thanks for reporting that bug. I've checked-in a fix. You can try the
latest Subversion, or wait for the next release candidate.

-Alex

--

On Fri, 20 Oct 2006 11:28:05 +0100
"Jake McMurchie" <jake.mcmurchie at googlemail.com> wrote:

> Oh dear, I do need to "keep events separate" so I can manage the
> events category page.
> 
> So, in a nutshell, here is the problem:
> 
> - I have the "Show events as blog entries:" set as "keep events separate"
> - I call ec3_get_events(); in my page,
> - I use query_posts to get posts from a single, other category (e.g.,
> query_posts('cat=4');)
> 
> I get the following error when query_posts is called:
> 
> [Column: 'category_id' in where clause is ambiguous]
> SELECT DISTINCT * FROM leftbank_posts LEFT JOIN leftbank_post2cat ON
> (leftbank_posts.ID = leftbank_post2cat.post_id) LEFT JOIN
> leftbank_post2cat ec3_post2cat ON ec3_post2cat.post_id=id WHERE 1=1
> AND (category_id = 2 OR category_id = 5 OR category_id = 6) AND
> post_date_gmt <= '2006-10-19 16:29:59' AND (post_status = "publish" OR
> post_author = 1 AND post_status != 'draft' AND post_status !=
> 'static') AND post_status != "attachment" GROUP BY leftbank_posts.ID
> ORDER BY post_date desc LIMIT 0, 10
> 
> Please help!
> 
> Thanks,
> 
> Jake
> 
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar


-- 
:: Let me solve your problems: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the EventCalendar mailing list