Ticket #5256 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Ambiguous column in query.php method get_posts()

Reported by: lawrence123 Assigned to: anonymous
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

5256.diff (0.6 kB) - added by DD32 on 10/25/07 07:03:37.

Change History

10/25/07 07:03:25 changed by DD32

  • keywords set to has-patch.

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

10/25/07 07:03:37 changed by DD32

  • attachment 5256.diff added.

10/25/07 16:27:29 changed by foolswisdom

  • milestone changed from 2.5 to 2.4.

11/03/07 19:00:33 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6310]) Disambiguate columns. Props lawrence123. fixes #5256