Prado\Exceptions\TDbException

Description

TDbCommand failed to execute the query SQL "SELECT count(id) FROM figure WHERE is_duplicate = 0 AND is_deleted = 0 AND slug != '' AND (category = 'Dober's Barber Shop (3)' OR classification LIKE '%Dober's Barber Shop (3)%')": SQLSTATE[42000]: Syntax error or access violation: 1064 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 's Barber Shop (3)' OR classification LIKE '%Dober's Barber Shop (3)%')' at line 1 (Error Code: 0)

Source File

${PradoFramework}/Data/TDbCommand.php (280)

0269:             } else {
0270:                 $this->_statement = $this->getConnection()->getPdoInstance()->query($this->getText());
0271:             }
0272:             $result = $this->_statement->fetchColumn();
0273:             $this->_statement->closeCursor();
0274:             if (is_resource($result) && get_resource_type($result) === 'stream') {
0275:                 return stream_get_contents($result);
0276:             } else {
0277:                 return $result;
0278:             }
0279:         } catch (Exception $e) {
0280: throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
0281: } 0282: } 0283: 0284: /** 0285: * Executes the SQL statement and returns the first column of the result. 0286: * This is a convenient method of {@see query} when only the first column of data is needed. 0287: * Note, the column returned will contain the first element in each row of result. 0288: * @throws TDbException execution failed 0289: * @return array the first column of the query result. Empty array if no result. 0290: * @since 3.1.2 0291: */ 0292: public function queryColumn()

Stack Trace

#0 ${DocumentRoot}/protected/pages/product.php(436): Prado\Data\TDbCommand->queryScalar()
#1 ${DocumentRoot}/protected/pages/product.php(64): product->getListProduct()
#2 ${DocumentRoot}/protected/pages/product.php(23): product->loadData()
#3 ${PradoFramework}/Web/UI/TControl.php(1376): product->onLoad()
#4 ${PradoFramework}/Web/UI/TPage.php(242): Prado\Web\UI\TControl->loadRecursive()
#5 ${PradoFramework}/Web/UI/TPage.php(222): Prado\Web\UI\TPage->processNormalRequest()
#6 ${PradoFramework}/Web/Services/TPageService.php(536): Prado\Web\UI\TPage->run()
#7 ${PradoFramework}/Web/Services/TPageService.php(454): Prado\Web\Services\TPageService->runPage()
#8 ${PradoFramework}/TApplication.php(1329): Prado\Web\Services\TPageService->run()
#9 ${PradoFramework}/TApplication.php(410): Prado\TApplication->runService()
#10 ${DocumentRoot}/index.php(33): Prado\TApplication->run()
#11 {main}
2026-05-13 02:43 Apache/2.4.62 (AlmaLinux) OpenSSL/3.5.1 PRADO/4.3.1