Page 1 of 1

Database_core.php error

Posted: Sat Apr 22, 2023 6:45 am
by mhsuffolk
Phoenix 1.0.8.19 PHP 7.4

Getting a few of these in shop side error log.

[21-Apr-2023 20:39:20 Europe/London] PHP Warning: DB: [1064] 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 '1' LIMIT 1' at line 7 from <SELECT pd.products_name, m.manufacturers_name, cd.categories_name, p.products_model, p2c.categories_id
FROM products_description pd
INNER JOIN products_to_categories p2c ON p2c.products_id = pd.products_id
INNER JOIN products p ON pd.products_id = p.products_id
LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id
INNER JOIN categories_description cd ON p2c.categories_id = cd.categories_id AND cd.language_id='1'
in /home/****/public_html/includes/system/versioned/1.0.8.1/database_core.php on line 44
[21-Apr-2023 20:39:20 Europe/London] PHP Warning: WHERE pd.products_id='896'' AND pd.language_id='1' LIMIT 1> in /home/****/public_html/includes/system/versioned/1.0.8.1/database_core.php on line 44

I only have one language in the store.

Re: Database_core.php error

Posted: Sat Apr 22, 2023 7:19 am
by Kofod95
mhsuffolk wrote: Sat Apr 22, 2023 6:45 am [21-Apr-2023 20:39:20 Europe/London] PHP Warning: WHERE pd.products_id='896'' AND pd.language_id='1' LIMIT 1> in /home/****/public_html/includes/system/versioned/1.0.8.1/database_core.php on line 44
Not sure where or why, but there's two single quotes after the products_id, which seems to cause the error. Since there's a LIMIT 1, my guess is that this is in a box; if it were somewhere else, my guess is that you would have noticed the missing product.

//Daniel

Re: Database_core.php error

Posted: Sat Apr 22, 2023 8:27 am
by burt
I wasn't able to find a similar SQL in the core code, so may this be coming from an addon ? Could you search your files to try to find the module or addon that has this SQL?

Re: Database_core.php error

Posted: Sat Apr 22, 2023 8:34 am
by mhsuffolk
I have just discovered this SQL in this addon ULTIMATE SEO URLS app.php/addons/free_addon/ultimate_seo_urls/

This may be linked to another issue I have with this addon

I will pursue it in the addons support