PDOException

Description

SQLSTATE[42000]: Syntax error or access violation: 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 'rows FROM i_product2category pc LEFT JOIN i_category c ON c.Id = pc._cat...' at line 1

Source File

/data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/db2.php (97)

0086:         }
0087: 
0088:         $statement = self::$instance[1]->prepare($sql, self::$_driverOptions);
0089: 
0090:         if (! $statement){
0091:             $errorInfo = self::$instance[1]->errorInfo();
0092:             throw new PDOException("Database error [{$errorInfo[0]}]: {$errorInfo[2]}, driver error code is $errorInfo[1]");
0093:         }
0094: 
0095:         $paramsConverted = (is_array($params) ? ($params) : (array ($params)));
0096: 
0097: if ((! $statement->execute($paramsConverted)) || ($statement->errorCode() != '00000')){
0098: $errorInfo = $statement->errorInfo(); 0099: throw new PDOException("Database error [{$errorInfo[0]}]: {$errorInfo[2]}, driver error code is $errorInfo[1]"); 0100: } 0101: 0102: return $statement; 0103: } 0104: } 0105: /** 0106: * ** end of class ** 0107: */ 0108: 0109: ?>

Stack Trace

#0 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/db2.php(97): PDOStatement->execute(Array)
#1 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/db2.php(67): db2::_query('SELECT COUNT(*)...', Array)
#2 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/modules/models/category.php(102): db2::getRow('SELECT COUNT(*)...')
#3 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/modules/models/category.php(175): category->getRowsCount('SELECT pc._prod...')
#4 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/modules/models/category.php(87): category->printProducts('default', 'de')
#5 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/modules/models/category.php(712): category->printPage('', 'default', 'de')
#6 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(432): category->ReplaceCustomTag('PRINT_PAGE', 'default', 'default', 'de', '', 0)
#7 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(500): base_class->ProcessTag('PRINT_PAGE', 'default', 'default', 'de', 0)
#8 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(536): base_class->ProcessTemplate('<.PRINT_PAGE.>', 'default', 'default', 'de', 0)
#9 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/mainclass.php(37): base_class->Render('default', 'default', 'de')
#10 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/mainclass.php(1271): mainclass->printDefaultBody('default', 'de')
#11 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(432): mainclass->ReplaceCustomTag('DEFAULT_BODY', 'default', 'default', 'de', '', 0)
#12 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(500): base_class->ProcessTag('DEFAULT_BODY', 'default', 'default', 'de', 0)
#13 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/core/base_class.php(536): base_class->ProcessTemplate('<!DOCTYPE html>...', 'default', 'default', 'de', 0)
#14 /data/f/3/f33488f6-2b3b-4055-aabc-725294e98153/priroda.sk/web/index.php(130): base_class->Render('default', 'default', 'de')
#15 {main}
2023-06-06 02:19