Title: Filters don&#8217;t work &#8211; SQL error
Last modified: February 22, 2024

---

# Filters don’t work – SQL error

 *  Resolved [Christiaan van Luik](https://wordpress.org/support/users/cvl01/)
 * (@cvl01)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/filters-dont-work-sql-error/)
 * Hi,
 * Since one of the last updates (I think since 4.9) filters don’t work for me.
 * I did some digging in the code and saw that an SQL error is the problem.
 * The sql call `$result_log_rows = $wpdb->get_results( $sql_query_log_rows, OBJECT_K);//
   phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared` in web/app/plugins/simple-
   history/inc/class-log-query.php:409 gives the following error:
 *     ```wp-block-code
       Unknown column 'c1.value' in 'where clause'
       ```
   
 * If I change c1.value to context_message_key it works.
 * Also, the way this error is handled (exit if wpdb has last_error property) is
   not the best way of debugging, because of this error the simple history admin
   view just freezes after filtering but shows no error message.
 * Can you have a look at this problem? It seems to me that it doesn’t happen on
   all installations. Probably has something to do with sql version. I’m on version:
   mysqlnd 8.2.16

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/filters-dont-work-sql-error/#post-17447928)
 * Thanks for the bug report and for creating an issue. If other people come here
   with the same problem you can follow the progress here:
 * [https://github.com/bonny/WordPress-Simple-History/issues/428](https://github.com/bonny/WordPress-Simple-History/issues/428).
 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/filters-dont-work-sql-error/#post-17450390)
 * This is fixed in version **4.12.0**.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filters don’t work – SQL error’ is closed to new replies.

 * ![](https://ps.w.org/simple-history/assets/icon.svg?rev=3225008)
 * [Simple History – Track, Log, and Audit WordPress Changes](https://wordpress.org/plugins/simple-history/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-history/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-history/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-history/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-history/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-history/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/filters-dont-work-sql-error/#post-17450390)
 * Status: resolved