Open hahnn opened 7 months ago
Do you know where this query comes from? can you throw an exception and get a stack trace?
All the queries I see from WP core seem to wrap this 1 correctly. To me it seems like a bug in the plugin or WP core which we shouldn't try to fix for them, but instead should report.
There is an issue with this scpecific SQL request:
The issue is about the column comment_approved in SQL table wp_comments.
This table is like that:
As you can see, comment_approved is of type character varying(20).
That's why you cannot get an SQL request in which there is this:
AND comment_approved = 1
because it implies comment_approved would be of type integer (or bigint or smallint...)
Because it's a character varying(20), the SQL condition have to be like this instead:
AND comment_approved = '1'