[wp-trac] [WordPress Trac] #25775: WP_Date_Query table prefixing
WordPress Trac
noreply at wordpress.org
Wed Oct 30 18:11:40 UTC 2013
#25775: WP_Date_Query table prefixing
--------------------------+-----------------------------
Reporter: ew_holmes | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.7.1
Severity: major | Keywords: needs-patch
--------------------------+-----------------------------
I believe I've found a bug within WP_Date_Query. The lack of a `$wpdb`
table prefix will break queries that have any joins put into them.
If the `$column` specified is within the posts table, the `$column`
variable is not being prefixed by `$wpdb->posts` as it should be.
Alternatively, if you are comparing comment_date or comment_date_gmt,
`$wpdb->comments` should be prefixed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25775>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list