SQLException

Description

Could not execute query [Native 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 category.ORDERVIEW ASC' at line 2] [User Info: SELECT category.CATEGORYID FROM category WHERE category.LANGUAGEID=3 AND category.DELETED='0' AND category.HIDDEN='0' AND category.SITEID=0 AND category.PARENTID= ORDER BY category.ORDERVIEW ASC]

Source File

/home/alhedaya/public_html/protected/DataAccess/creole/drivers/mysql/MySQLConnection.php (202)

0191:         $this->lastQuery = $sql;
0192:         //echo $sql;
0193:         //echo '<b style="color:red">'.$this->i++.'<b>';
0194:         //echo '<hr>';
0195:         if ($this->database) {
0196:             if (!@mysql_select_db($this->database, $this->dblink)) {
0197:                 throw new SQLException('No database selected', mysql_error($this->dblink));
0198:             }
0199:         }
0200:                 $result = @mysql_query($sql, $this->dblink);
0201:         if (!$result) {
0202: throw new SQLException('Could not execute query', mysql_error($this->dblink), $sql);
0203: } 0204: return new MySQLResultSet($this, $result, $fetchmode); 0205: } 0206: 0207: /** 0208: * @see Connection::executeUpdate() 0209: */ 0210: function executeUpdate($sql) 0211: { 0212: $this->lastQuery = $sql; 0213: 0214: if ($this->database) {

Stack Trace

#0 /home/alhedaya/public_html/protected/DataAccess/creole/common/StatementCommon.php(242): MySQLConnection->executeQuery('SELECT category...', NULL)
#1 /home/alhedaya/public_html/protected/Layouts/shiasites/LayoutHomeShiaSites.php(144): StatementCommon->executeQuery('SELECT category...')
#2 /home/alhedaya/public_html/protected/Layouts/shiasites/LayoutHomeShiaSites.php(133): LayoutHomeShiaSites->LoadCas('')
#3 /home/alhedaya/public_html/protected/Layouts/shiasites/LayoutHomeShiaSites.php(77): LayoutHomeShiaSites->LoadDataCategories('')
#4 /home/alhedaya/public_html/protected/Layouts/shiasites/LayoutHomeShiaSites.php(29): LayoutHomeShiaSites->loadSelectiveSite()
#5 /home/alhedaya/public_html/framework/pradolite.php(4062): LayoutHomeShiaSites->OnInit(NULL)
#6 /home/alhedaya/public_html/framework/pradolite.php(5430): TControl->initRecursive(Object(shiasites))
#7 /home/alhedaya/public_html/framework/pradolite.php(5546): TCompositeControl->initRecursive(Object(shiasites))
#8 /home/alhedaya/public_html/framework/pradolite.php(4047): TTemplateControl->initRecursive(Object(shiasites))
#9 /home/alhedaya/public_html/framework/pradolite.php(5430): TControl->initRecursive(NULL)
#10 /home/alhedaya/public_html/framework/pradolite.php(5546): TCompositeControl->initRecursive(NULL)
#11 /home/alhedaya/public_html/framework/pradolite.php(6050): TTemplateControl->initRecursive()
#12 /home/alhedaya/public_html/framework/pradolite.php(6045): TPage->processNormalRequest(Object(THtmlWriter))
#13 /home/alhedaya/public_html/framework/pradolite.php(8162): TPage->run(Object(THtmlWriter))
#14 /home/alhedaya/public_html/framework/pradolite.php(8128): TPageService->runPage(Object(shiasites), Array)
#15 /home/alhedaya/public_html/framework/pradolite.php(9089): TPageService->run()
#16 /home/alhedaya/public_html/framework/pradolite.php(8704): TApplication->runService()
#17 /home/alhedaya/public_html/en.php(141): TApplication->run()
#18 {main}
2017-11-21 08:30 Apache/2.2.31 (Unix) PHP/5.2.17 PRADO/3.1.2a