CDbException

CDbCommand ha riportato un errore nell'esecuzione della query SQL: SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near '032866'.. The SQL statement executed was: SELECT top 4 id,id_categoria_gruppo, id_articolo_web, descrizione,gruppo, titolo, id_articolo, id_categoria_sottogruppo, corrispondenze_testo,sottogruppo
FROM articoli_web_elaborati INNER JOIN
FREETEXTTABLE(articoli_web_elaborati,corrispondenze, 'ThinkPad Edge 11' 032866J <b>/</b> ThinkPad T400s <b>/</b> ThinkPad T400s 2801 <b>/</b> ThinkPad T400s 2808 <b>/</b> ThinkPad T400s 2809 <b>/</b> ThinkPad T400s 2815 <b>/</b> ThinkPad T400s 2823 <b>/</b> ThinkPad T400s 2824 <b>/</b> ThinkPad T400s 2825 <b>/</b> ThinkPad T410s <b>/</b> ThinkPad T410si <b>/</b> 59+ (6 cells) <b>/</b> 42T4689 <b>/</b> 42T4691 <b>/</b> 42T4832 <b>/</b> 42T4833 <b>/</b> 51J0497 <b>/</b> ASM 42T4691 <b>/</b> FRU 42T4688 <b>/</b> FRU 42T4690 <b>/</b> ') AS T
ON articoli_web_elaborati.id = T.[KEY]
where id_categoria_gruppo<>10
ORDER BY T.RANK DESC;

C:\xampp\htdocs\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

#2
+
 C:\xampp\htdocs\nada_uptown\protected\models\ArticoliWebElaborati.php(225): CActiveRecord->findAllBySql("SELECT top 4 id,id_categoria_gruppo, id_articolo_web, descrizion...")
220 FROM articoli_web_elaborati INNER JOIN 
221     FREETEXTTABLE(articoli_web_elaborati,corrispondenze, '$corrispondenze') AS T
222     ON articoli_web_elaborati.id = T.[KEY]
223         where id_categoria_gruppo<>$id_gruppo 
224 ORDER BY T.RANK DESC;";
225         return self::model()->findAllBySql($sql);
226 //
227 //        $connection = Yii::app()->db;
228 //        return $connection->createCommand($sql)->queryAll();
229     }
230     
#3
+
 C:\xampp\htdocs\nada_uptown\themes\ispiniaOLD\views\listino\_moduloArticoliCorrelati.php(1): ArticoliWebElaborati::ArticoliCorrelati("ThinkPad Edge 11' 032866J <b>/</b> ThinkPad T400s <b>/</b> Think...", "10")
1 <?php $articoli = ArticoliWebElaborati::model()->articoliCorrelati($corrispondenze, $id_gruppo); ?>
2 
3 <div class="row">
4     <div class="col-lg-12">
5 
6 
#7
+
 C:\xampp\htdocs\nada_uptown\themes\ispiniaOLD\views\listino\schedaProdotto.php(413): CController->renderPartial("_moduloArticoliCorrelati", array("corrispondenze" => "ThinkPad Edge 11' 032866J <b>/</b> ThinkPad T400s <b>/</b> Think...", "id_gruppo" => "10"))
408 
409 
410 
411 
412 <?php if ($articolo->corrispondenze_testo != null): ?>
413     <?php $this->renderPartial('_moduloArticoliCorrelati', array('corrispondenze' => $testo, 'id_gruppo' => $articolo->id_categoria_gruppo)) ?>
414 
415 <?php endif; ?>
416 
417 <?php if (yii::app()->user->getState('risposta_domanda') == 'true'): ?>
418 
2024-03-29 07:03:14 Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38 Yii Framework/1.1.17