Unknown Colum in where clause, error code 1054
Opened this issue · 0 comments
Expected Behavior
All the SQL queries should complete properly.
Not sure if this just my weird setup or what but I get an error in querymon. I got a similar error with a bit of php I was running (Cavalcade Runner) that utilized the double quotes instead of the single quotes in a query. I had to manually go in and change the query to put single quotes around the string and I also added the back tick around the column names in the where clause. So instead of:
SELECT COUNT(*)
FROM `wp_wpmailsmtp_debug_events`
WHERE event_type = 0
AND created_at >= "2023-11-18 09:26:37"
I changed it to something like:
SELECT COUNT(*)
FROM `wp_wpmailsmtp_debug_events`
WHERE event_type = 0
AND `created_at` >= '2023-11-18 09:26:37'
Current Behavior
Nothing disastrous so far, just one bug in query monitor when I go to the dashboard.
Possible Solution
Probably strictly adherence to the SQL language strictures. (Just change around a couple of quotes I think). I don't even know if this is relevant to you guys tbh. I never had these issues with MariaDB. And tbh, everything seems to be working properly as far as I can tell.
Steps to Reproduce
- Have a WP site on a mysql 8 instance.
- install wm-mail-smtp
- install querymon
- go to the back end dashboard