CDbException

CDbCommand failed to execute the SQL statement: 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 '' at line 13. The SQL statement executed was:
select
id
, metaTag_type_id
, tbl_id
, title
, description
, keyWords
from
metaTag_tbl
where
metaTag_type_id = 1
and
tbl_id =

/nfs/c05/h02/mnt/158061/domains/bryantboats/common/lib/yii/db/CDbCommand.php(541)

529         {
530             if($this->_connection->enableProfiling)
531                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
532 
533             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
534             $message=$e->getMessage();
535             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
536                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
537 
538             if(YII_DEBUG)
539                 $message.='. The SQL statement executed was: '.$this->getText().$par;
540 
541             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
542                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
543         }
544     }
545 
546     /**
547      * Builds a SQL SELECT statement from the given query specification.
548      * @param array $query the query specification in name-value pairs. The following
549      * query options are supported: {@link select}, {@link distinct}, {@link from},
550      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
551      * {@link limit}, {@link offset} and {@link union}.
552      * @return string the SQL statement
553      * @since 1.1.6

Stack Trace

#1
+
 /nfs/c05/h02/mnt/158061/domains/bryantboats/common/components/boat/MetaTag.php(23): CDbCommand->queryAll()
18                         where
19                             metaTag_type_id = " . $metaTagTypeId . "
20                             and
21                             tbl_id = ". $id
22                 );
23             return $command->queryAll();
24         }
25     }
26 ?>
#2
+
 /nfs/c05/h02/mnt/158061/domains/bryantboats/common/components/boatDetail/UIBoat.php(25): MetaTag::GetMetTagData(null, 1)
20             $this->_boatSlides = BoatSlidesTbl::model()->findAllByAttributes
21                 (
22                     array('boats_tbl_id' => $boat->id),
23                     array('order' => 'id')
24                 );
25             $this->_metaTagData = new BoatDetailMetaTagBehavior(MetaTag::GetMetTagData($boat->id, MetaTagType::Boat));
26             $this->_deadriseBehavior = DeadriseBehaviorFactory::GetDeadriseBehavior($boat->deadrise);
27 
28         }
29 
30         private function AssignDetail($boatId)
#3
+
 /nfs/c05/h02/mnt/158061/domains/bryantboats/frontend/controllers/BoatDetailController.php(16): UIBoat->__construct(null)
11         $boat = BoatsTbl::model()->find
12         (
13             'boat_name=:boatName', array(':boatName' => $boatName)
14         );
15 
16         $uiBoat = new UIBoat($boat);
17 
18         $boatId = $boat->id;
19 
20         // find the standard equipment items ID that belongs to this boat
21         $equip = BoatStandardEquipTbl::model()->findAllByAttributes
2017-04-26 08:36:23 Apache/2.2.22 Yii Framework/1.1.13