mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Query: Use AND in a SQL query rather than &&.
This appears to have been the only instance of `&&` being used in SQL, so for consistency lets remove it. Props scrappy@hub.org. Fixes #37903. git-svn-id: https://develop.svn.wordpress.org/trunk@38491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2411,7 +2411,7 @@ class WP_Query {
|
||||
$cgroupby = "{$this->db->comments}.comment_id";
|
||||
} else { // Other non singular e.g. front
|
||||
$cjoin = "JOIN {$this->db->posts} ON ( {$this->db->comments}.comment_post_ID = {$this->db->posts}.ID )";
|
||||
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
|
||||
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' AND post_type = 'attachment' ) ) AND comment_approved = '1'";
|
||||
$cgroupby = '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user