Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-27-2024 08:03:23

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1714

Database/MySQL error.

Hi Nick

Please can you look at this error which has started. Only happens if I go to Store>Catalog>Product Offers and click Add Item

Script Execution 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 sortorder ASC' at line 1
File: /core-private/core/CORE_DB/ext/mysqli.php Line: 963 Error Number: 256

Debug report:
CORE_Display::load_object: Cached object returned: CORE_DB_1 Class: CORE_DB

CORE_DB_mysqli::xsql_do: The MySQLi extension executed statement: SELECT cid, cname, cdescription FROM core_columndefs WHERE cid LIKE 'ecom_pricemap.%' ORDER BY cid ASC

CORE_DB_mysqli::xsql_do: The MySQLi extension executed statement: SELECT selectid, selectname, selectvalue FROM core_selectcustom WHERE selectid='core.taxstateprov' OR selectid='core.taxcountry' OR selectid='core.taxclass' ORDER BY selectorder ASC

CORE_Error::error: Fatal error encountered: 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 sortorder ASC' at line 1


Happens in both live and test site. I have swapped back to the standard code files, cleared product, inventory and pricemap tables, and reloaded database definitions.
Still get same error.
I can clone a product and save it correctly, so I can get around the error. I have also checked and it doesn't happen if I add a new category or new inventory item.

Thanks
Rob

Last edited by zanart (05-27-2024 08:05:41)


Rob

Offline

 

#2 05-28-2024 02:43:55

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1714

Re: Database/MySQL error.

HI Nick


I have tracked down the error to this line of code in formfield_offertype.php - line 139.

$res = $CORE_DB->sql_do(array('sql' => $sql, 'table' => 'ecom_pricemap', 'order' => array('sortorder' => 'ASC')));

Thanks
Rob

Last edited by zanart (05-28-2024 05:24:24)


Rob

Offline

 

#3 05-28-2024 12:23:47

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19818
Website

Re: Database/MySQL error.

Thanks, Rob.  We saw that error pop up on PHP8.2 and have corrected it in dev.  This change will be part of release 9.4, which is due out soon.  I appreciate you posting this here.


Nick Hendler

Offline

 

Board footer