• In database queries inside the main plugin file are not as per the standard WordPress queries.
    In file “search-everything.php” there is a function “se_build_exclude_categories”. In this function author is using below query:

    $excludeQuery = ” AND ( ctax.term_id NOT IN ( “.$excl_list.” ) OR (wp_posts.post_type IN ( ‘page’ )))”;

    Just look at the query, he is using “wp_post” for post table. Here table prefix for post table is “wp_” which is not dynamic. Author should use something like below:

    $excludeQuery = ” AND ( ctax.term_id NOT IN ( “.$excl_list.” ) OR (“.$wpdb->prefix.”posts.post_type IN ( ‘page’ )))”;

    In place of “wp_” we should always use “$wpdb->prefix” in our queries so that our query will not break even change of table prefix by the user from wp-config.php file.

    Request to author, please update it in your next release.

    Thanks,
    Sunil Chaudhary

  • The topic ‘Queries are not dynamic’ is closed to new replies.