Title: WordPress eventcalendar3 db error
Last modified: August 18, 2016

---

# WordPress eventcalendar3 db error

 *  [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/)
 * Hello,
 * Ok, so: I’m using eventcalendar3 for this site and for whatever reason, when 
   I use it on the home page I get db errors for every other loop:
 * [http://dev.perspectivescs.org/](http://dev.perspectivescs.org/)
 * here’s a page template that is identical to the index page:
 * [http://dev.perspectivescs.org/?page_id=134](http://dev.perspectivescs.org/?page_id=134)
 * On all the inner pages I get no errors, but in index I do. If you click on on
   the calendar tab in the bottom right, that’s where the calendar is. Notice the
   calendar itself works. So what’s the deal? When I deactivate the calendar this
   page is fine, but when I strip out the calendar tag the page is still zonked.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470395)
 * You may have a conflicting plugin – similar to what is described here:
    [http://wordpress.org/search/Column+%27category_id%27+in+where+clause+is+ambiguous?forums=1](http://wordpress.org/search/Column+%27category_id%27+in+where+clause+is+ambiguous?forums=1)
 *  Thread Starter [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470404)
 * I disabled all the other plugins, and I also tried taking every db call off the
   page except one and i’m still getting a db error. so it has to be something with
   event calendar 3 being used on the index page.
 *  Thread Starter [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470468)
 * the newest event calendar 3 candidate release is bad. problem solved.
 *  Thread Starter [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470790)
 * Sorry that the title of this is incorrect. It should be WordPress eventcalendar3
   db error.
 * So check it out:
 * [http://dev.perspectivescs.org/](http://dev.perspectivescs.org/)
 * Works fine. Then you go to search results:
 * [http://dev.perspectivescs.org/?s=another](http://dev.perspectivescs.org/?s=another)
 * and the errors are back. I’ve tried everything, even copying over the code so
   the two pages, index.php and search.php, are identical. and I still get these
   errors. This is related to the eventcalendar3 plugin. maybe the s in the string
   is the culprit? I have no idea but I’m pulling my hair out.
 *  Thread Starter [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470793)
 * Ok so here’s the error:
 * `
    WordPress database error: [Column 'category_id' in where clause is ambiguous]
   SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.
   post_id) LEFT JOIN wp_post2cat ec3_post2cat ON ec3_post2cat.post_id=id LEFT JOIN
   wp_ec3_schedule ec3_sch ON ec3_sch.post_id=id AND ec3_sch.end>='2006-11-08 00:
   00:00' WHERE 1=1 AND (category_id = 3) AND post_date_gmt <= '2006-11-08 16:42:
   59' AND ((post_status = "static" or post_status = "publish") OR post_author =
   1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "
   attachment" AND (ec3_sch.post_id IS NOT NULL OR ec3_post2cat.category_id!=5) 
   GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 10
 * So the db request is including these:
 * `
    ec3_post2cat ON ec3_post2cat.post_id=id LEFT JOIN wp_ec3_schedule ec3_sch 
   ON ec3_sch.post_id=id AND ec3_sch.end>='2006-11-08 00:00:00
 * `
    (ec3_sch.post_id IS NOT NULL OR ec3_post2cat.category_id!=5)
 * and I don’t kno why it’s trying to include event calendar 3 (ec3) calls in there
   because these don’t pertain to the calendar at all.
 *  Thread Starter [public_radio](https://wordpress.org/support/users/public_radio/)
 * (@public_radio)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470794)
 * ok guys, here’s what I’m going to do: In the case of the search results, I’m 
   just going to hard query and pull the results. i’m trying to do that and I’m 
   getting an error that says ‘unexpected T_STATIC’.
 * here’s the query:
 * `
    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.
   post_id) WHERE 1=1 AND (category_id = 3) AND ((post_status = "static" or post_status
   = "publish") OR post_author = 1 AND post_status != 'draft' AND post_status !='
   static') AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date
   DESC LIMIT 0, 10
 * So is there too much in this query? all I want to do is pull my posts based on
   a certain category. What can I do here?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘WordPress eventcalendar3 db error’ is closed to new replies.

 * 6 replies
 * 2 participants
 * Last reply from: [public_radio](https://wordpress.org/support/users/public_radio/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/wordpress-eventcalendar3-db-error/#post-470794)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
