【早鳥優惠】香港迪士尼樂園酒店Staycation優惠(海景陽台房)
Hong Kong Disneyland Hotel
Exception
Joomla\Database\Exception\ PrepareStatementFailureException
in
/home/mroom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php
(line 141)
$this->statement = $connection->prepare($query);
if (!$this->statement)
{
throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno);
}
}
/**
* Replace named parameters with numbered parameters
in
/home/mroom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php
->
__construct
(line 1089)
* @since 2.0.0
* @throws PrepareStatementFailureException
*/
protected function prepareStatement(string $query): StatementInterface
{
return new MysqliStatement($this->connection, $query);
}
/**
* Unlocks tables in the database.
*
in
/home/mroom/public_html/libraries/vendor/joomla/database/src/DatabaseDriver.php
->
prepareStatement
(line 1900)
$query->setLimit($limit, $offset);
$sql = $this->replacePrefix((string) $query);
$this->statement = $this->prepareStatement($sql);
$this->sql = $query;
$this->limit = (int) max(0, $limit);
$this->offset = (int) max(0, $offset);
DatabaseDriver->setQuery(object(MysqliQuery))
in
/home/mroom/public_html/templates/bengsengtravel/html/manageprice/related_article.php
(line 67)
$rqry = "(related_pro_cat = ".$rpro[0]." OR FIND_IN_SET('".$rpro[0]."',related_pro_cat))";
}
echo "<div style='display:none;'>SELECT *,(CHAR_LENGTH(related_pro_cat) - CHAR_LENGTH(REPLACE(related_pro_cat, ',', '')) + 1) as total FROM #__articles WHERE (".$rqry.") AND article_id !=".$article_id." AND is_suggestion=1 AND article_status=1 order by total DESC limit 8</div>";
$db2->setQuery("SELECT *,(CHAR_LENGTH(related_pro_cat) - CHAR_LENGTH(REPLACE(related_pro_cat, ',', '')) + 1) as total FROM #__articles WHERE (".$rqry.") AND article_id !=".$article_id." AND is_suggestion=1 AND article_status=1 order by total DESC limit 8");
$related_products = $db2->loadObjectList();
if(!empty($related_products)){
Stack Trace
PrepareStatementFailureException
|
---|
Joomla\Database\Exception\PrepareStatementFailureException: 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 'OR FIND_IN_SET('',related_pro_cat))) AND article_id !=1449 AND is_suggestion=1 A' at line 1 at /home/mroom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:141 at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SELECT *,(CHAR_LENGTH(related_pro_cat) - CHAR_LENGTH(REPLACE(related_pro_cat, \',\', \'\')) + 1) as total FROM fx_articles WHERE ((related_pro_cat = OR FIND_IN_SET(\'\',related_pro_cat))) AND article_id !=1449 AND is_suggestion=1 AND article_status=1 order by total DESC limit 8') (/home/mroom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089) at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT *,(CHAR_LENGTH(related_pro_cat) - CHAR_LENGTH(REPLACE(related_pro_cat, \',\', \'\')) + 1) as total FROM fx_articles WHERE ((related_pro_cat = OR FIND_IN_SET(\'\',related_pro_cat))) AND article_id !=1449 AND is_suggestion=1 AND article_status=1 order by total DESC limit 8') (/home/mroom/public_html/libraries/vendor/joomla/database/src/DatabaseDriver.php:1900) at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery)) (/home/mroom/public_html/templates/bengsengtravel/html/manageprice/related_article.php:67) |