Database_core.php error

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Database_core.php error

Post 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Database_core.php error

Post 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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Database_core.php error

Post 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?
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: Database_core.php error

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply