• Resolved saot

    (@saot)


    Hello @dondon-benjamincouk,

    I’ve noticed, that if i try to search withh all fields on default value “any” it works, and shows all the articles.

    But when I change any of them (for example Audi for cars) it shows nothing.

    Here are the logs:
    [Mon Nov 27 20:43:29 2017] [error] [client 37.14.73.253] PHP Warning: mysqli_escape_string() expects parameter 1 to be mysqli, resource given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/
    [Mon Nov 27 20:43:29 2017] [error] [client 37.14.73.253] PHP Warning: mysqli_escape_string() expects parameter 1 to be mysqli, resource given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/
    [Mon Nov 27 20:43:29 2017] [error] [client 37.14.73.253] PHP Warning: mysqli_escape_string() expects parameter 1 to be mysqli, resource given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/
    [Mon Nov 27 20:43:29 2017] [error] [client 37.14.73.253] PHP Warning: mysqli_escape_string() expects parameter 1 to be mysqli, resource given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/
    [Mon Nov 27 20:43:29 2017] [error] [client 37.14.73.253] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) ) AND ( (1*wpcfs4_1.meta_value>=) ) AND ( (wpcfs7_1.meta_value=”) ) ORDER BY’ at line 1 for query SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_postmeta AS wpcfs1_1 ON wpcfs1_1.meta_key=” AND wpcfs1_1.post_id = wp_posts.id LEFT JOIN wp_postmeta AS wpcfs2_1 ON wpcfs2_1.meta_key=” AND wpcfs2_1.post_id = wp_posts.id LEFT JOIN wp_postmeta AS wpcfs4_1 ON wpcfs4_1.meta_key=” AND wpcfs4_1.post_id = wp_posts.id LEFT JOIN wp_postmeta AS wpcfs7_1 ON wpcfs7_1.meta_key=” AND wpcfs7_1.post_id = wp_posts.id WHERE 1=1 AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’) AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_author = 1 AND wp_posts.post_status = ‘private’) AND ( (wpcfs1_1.meta_value=”) ) AND ( (1*wpcfs2_1.meta_value>=) ) AND ( (1*wpcfs4_1.meta_value>=) ) AND ( (wpcfs7_1.meta_value=”) ) ORDER BY wp_posts.post_date DESC LIMIT 0, 999 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, referer: http://iberiaauto.es/

    If I change mysqli_escape_string to mysql_escape_string (Which I’m not sure is OK) logs are those:

    [Mon Nov 27 20:49:03 2017] [error] [client 37.14.73.253] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) ) ORDER BY wp_posts.post_date DESC LIMIT 0, 999’ at line 1 for query SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_postmeta AS wpcfs2_1 ON wpcfs2_1.meta_key=” AND wpcfs2_1.post_id = wp_posts.id WHERE 1=1 AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’) AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_author = 1 AND wp_posts.post_status = ‘private’) AND ( (1*wpcfs2_1.meta_value>=) ) ORDER BY wp_posts.post_date DESC LIMIT 0, 999 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, referer: http://iberiaauto.es/
    [Mon Nov 27 20:49:11 2017] [error] [client 37.14.73.253] PHP Warning: mysql_escape_string() expects exactly 1 parameter, 2 given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/
    [Mon Nov 27 20:49:11 2017] [error] [client 37.14.73.253] PHP Warning: mysql_escape_string() expects exactly 1 parameter, 2 given in /var/www/saot/data/www/iberiaauto.es/wp-content/plugins/wp-custom-fields-search/functions.php on line 15, referer: http://iberiaauto.es/

    The page I need help with: [log in to see the link]

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

The topic ‘Search by fields not working’ is closed to new replies.