Error with some queries: single quote caracter
-
Checking my error_log I found that:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tite+voiture&oq=p'tite+voiture&aqs=heirloom-srp..' LIKE ...' at line 1 in request SELECT id FROM wp_wsm_searchEngines WHERE 'google.fr/search?q=p'tite+voiture&oq=p'tite+voiture&aqs=heirloom-srp..' LIKE CONCAT('%',CONCAT(name,'%')) made by require_once('wp-load.php'), require_once('/home/wordpress/wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, wsmInitPlugin::wsm_plugin_init, wsmDatabase->fnCorrectDatabaseTables, wsmDatabase->fnGetToolBarID
Of course I encounter this error for different calls to fnCorrectDatabaseTables : querying wp_wsm_searchEngines and wp_wsm_toolBars.
It looks like your queries do not take into account single quote inside search field. Thus they get truncated and badly interpreted, creating syntax error…
But that maybe means that you don’t handle such google queries URL well way before calls to fnCorrectDatabaseTables (maybe this is the reason why fnCorrectDatabaseTables has to be called?).Could you check that please, as single quote search on search engines often lead to my site…
- The topic ‘Error with some queries: single quote caracter’ is closed to new replies.