Исключение / ошибка (DBException)

Основные сведения

Текст ошибки:

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 '' at line 1 / SELECT * FROM categories WHERE categoryid=

Файл:

/core/db/db.class.php (111)

Часть кода:
#0 /var/www/totalparts/data/www/totalparts.ru/categorizers/catcategories.class.php(42): DB->select2array('system', 'SELECT * FROM c...')
#1 /var/www/totalparts/data/www/totalparts.ru/widgetcontrollers/germes/wpageheader.class.php(91): CATCategories->getItem(NULL, true)
#2 /var/www/totalparts/data/www/totalparts.ru/core/common/pagecontroller.class.php(209): WPageHeader->render()
#3 /var/www/totalparts/data/www/totalparts.ru/index.php(56): PageController->render()
#4 {main}

Журнал действий

0.13847500 1627219678 / DB / system: SELECT `oemid`,`ident`,`title`,`catalog_number`,`brandid`,`itemid`,`guid`,`categoryid` FROM `oem` WHERE `ident` = 'remont_bloka_upravleniya_as2409ik_sv_1_03_51037594' ORDER BY catalog_number ASC
0.19804500 1627219678 / DB / system: SELECT `itemid`,`ident`,`title`,`guid`,`reference`,`price`,`categoryid`,`balance`,`picture`,`requestscounter` FROM `items` WHERE `itemid` IN ('0') ORDER BY itemid desc
0.19819100 1627219678 / DB / system: SELECT `itemid`,`ident`,`title`,`guid`,`reference`,`price`,`categoryid`,`balance`,`picture`,`requestscounter` FROM `items` WHERE `itemid` IN ('0') ORDER BY itemid desc
0.19858300 1627219678 / DB / system: SELECT * FROM `brands` ORDER BY title ASC
0.21957900 1627219678 / DB / system: SELECT * FROM brands WHERE brandid=267
0.21997000 1627219678 / DB / system: SELECT * FROM categories WHERE categoryid=