Opened 6 years ago
Closed 6 years ago
#5256 closed defect (bug) (fixed)
Ambiguous column in query.php method get_posts()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | General | Version: | 2.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Using v2.3, line 871 should be:
$where = " AND $wpdb->posts.ID = " . $qp?;
and line 876 should be:
$where = " AND $wpdb->posts.ID = " . $qpage_id?;
Background: My plugin uses the posts_where and post_join filters. When you join with another table that also has an ID column the query will fail, because above lines currently show: ' AND ID = '
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.

what about line 849?
Attached a patch based on what you've asked for against trunk.