[EventCalendar] query_posts for category generates
error"'category_id' in where clause is ambiguous"
Jake McMurchie
jake.mcmurchie at googlemail.com
Fri Oct 20 10:28:05 UTC 2006
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
More information about the EventCalendar
mailing list