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 MariaDB server version for the right syntax to use near '' at line 1. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`sell_end_date` AS `t0_c1`, `t`.`code` AS `t0_c2`, `t`.`name` AS `t0_c3`, `t`.`short_name` AS `t0_c4`, `t`.`description` AS `t0_c5`, `t`.`content` AS `t0_c6`, `t`.`user_id` AS `t0_c7`, `t`.`module_id` AS `t0_c8`, `t`.`module2_id` AS `t0_c9`, `t`.`module3_id` AS `t0_c10`, `t`.`module4_id` AS `t0_c11`, `t`.`module5_id` AS `t0_c12`, `t`.`category_id` AS `t0_c13`, `t`.`header_image_id` AS `t0_c14`, `t`.`layout_id` AS `t0_c15`, `t`.`listing_draft_id` AS `t0_c16`, `t`.`listing_category_id` AS `t0_c17`, `t`.`category_old` AS `t0_c18`, `t`.`category_proposition` AS `t0_c19`, `t`.`contact` AS `t0_c20`, `t`.`phone` AS `t0_c21`, `t`.`mobile` AS `t0_c22`, `t`.`fax` AS `t0_c23`, `t`.`email` AS `t0_c24`, `t`.`website` AS `t0_c25`, `t`.`address` AS `t0_c26`, `t`.`address_addition` AS `t0_c27`, `t`.`postal_code` AS `t0_c28`, `t`.`city_id` AS `t0_c29`, `t`.`map_latitude` AS `t0_c30`, `t`.`map_longitude` AS `t0_c31`, `t`.`video_url` AS `t0_c32`, `t`.`podcast_url` AS `t0_c33`, `t`.`opening_times` AS `t0_c34`, `t`.`monday_begin` AS `t0_c35`, `t`.`monday_end` AS `t0_c36`, `t`.`tuesday_begin` AS `t0_c37`, `t`.`tuesday_end` AS `t0_c38`, `t`.`allowed_videos` AS `t0_c39`, `t`.`rating` AS `t0_c40`, `t`.`rating_count` AS `t0_c41`, `t`.`recommendation` AS `t0_c42`, `t`.`access_count` AS `t0_c43`, `t`.`comment` AS `t0_c44`, `t`.`rank` AS `t0_c45`, `t`.`to_delete` AS `t0_c46`, `t`.`is_product` AS `t0_c47`, `t`.`is_highlight` AS `t0_c48`, `t`.`is_search_highlight` AS `t0_c49`, `t`.`is_promotion` AS `t0_c50`, `t`.`is_featured` AS `t0_c51`, `t`.`is_validated` AS `t0_c52`, `t`.`is_indexed` AS `t0_c53`, `t`.`is_active` AS `t0_c54`, `t`.`reference` AS `t0_c55`, `t`.`created_by` AS `t0_c56`, `t`.`created_date` AS `t0_c57`, `t`.`modified_email` AS `t0_c58`, `t`.`modified_by` AS `t0_c59`, `t`.`modified_date` AS `t0_c60`, `t`.`allowed_images` AS `t0_c61`, `t`.`wednesday_begin` AS `t0_c62`, `t`.`wednesday_end` AS `t0_c63`, `t`.`thursday_begin` AS `t0_c64`, `t`.`thursday_end` AS `t0_c65`, `t`.`friday_begin` AS `t0_c66`, `t`.`friday_end` AS `t0_c67`, `t`.`saturday_begin` AS `t0_c68`, `t`.`saturday_end` AS `t0_c69`, `t`.`sunday_begin` AS `t0_c70`, `t`.`sunday_end` AS `t0_c71`, `t`.`highlight_end_date` AS `t0_c72`, `t`.`highlight_id` AS `t0_c73`, `t`.`search_highlight_end_date` AS `t0_c74`, `t`.`sell_type_id` AS `t0_c75`, `images`.`id` AS `t1_c0`, `images`.`name` AS `t1_c1`, `images`.`description` AS `t1_c2`, `images`.`title` AS `t1_c3`, `images`.`author` AS `t1_c4`, `images`.`copyright` AS `t1_c5`, `images`.`original_name` AS `t1_c6`, `images`.`link` AS `t1_c7`, `images`.`rank` AS `t1_c8`, `images`.`force_crop` AS `t1_c9`, `images`.`is_logo` AS `t1_c10`, `images`.`is_banner` AS `t1_c11`, `images`.`modified_date` AS `t1_c12`, `images`.`modified_by` AS `t1_c13` FROM `listing` `t` LEFT OUTER JOIN `listing_image` `images_images` ON (`t`.`id`=`images_images`.`listing_id`) LEFT OUTER JOIN `image` `images` ON (`images`.`id`=`images_images`.`image_id`) WHERE (t.is_active=1 AND t.category_id IN ('58' AND 8228=8228#') AND t.is_active='1') ORDER BY CASE WHEN images.id is NOT NULL THEN 1 ELSE 2 END,t.access_count DESC LIMIT 5

/home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/framework/db/CDbCommand.php(543)

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

Stack Trace

#8
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/protected/models/Listing.php(539): CDataProvider->getData()
534         $options['offset']=0;
535         $options['limit']=$limit;
536     
537         $dataProvider=Listing::getDataProvider($options,$order,$ignore_search);
538         
539         return $dataProvider->getData();
540     }
541     
542     public static function getMostRecentItems($options=array(),$order="",$ignore_search=false,$limit=5)
543     {
544         // $options['condition']=" images.id is NOT NULL ";
#9
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/protected/controllers/ListingController.php(767): Listing::getMostPopularItems(array("category_id" => null, "module_id" => "623"))
762             $condition=array('category_id'=>isset($model->category->parent)?$model->category->parent_id:$model->category_id);
763             if (!$condition['category_id'])
764                 $condition['module_id']=$module_id;
765             
766             // Most popular
767             $items=Listing::getMostPopularItems($condition);        
768             $sidebarBlocs[]=array(
769                 'name' => AP_BLOC_PATH.'_featured_list',
770                 'title' => Yii::t('app','Populaires'),
771                 'items' => $items,
772             );
#22
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/index.php(58): CApplication->run()
53         // header("Location: http://pro.".AP_DOMAIN_NAME."/".$url);
54         // exit;
55     // }
56 
57 require_once($yii);
58 Yii::createWebApplication($config)->run();
2024-03-28 15:55:20 Apache Yii Framework/1.1.14