/usr/local/nginx/html/yii-1.1.10/framework/db/CDbCommand.php(354)
342 return $n;
343 }
344 catch(Exception $e)
345 {
346 if($this->_connection->enableProfiling)
347 Yii::endProfile(‘system.db.CDbCommand.execute(’.$this->getText().’)’,‘system.db.CDbCommand.execute’);
348 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
349 $message = $e->getMessage();
350 Yii::log(Yii::t(‘yii’,‘CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.’,
351 array(’{error}’=>$message, ‘{sql}’=>$this->getText().$par)),CLogger::LEVEL_ERROR,‘system.db.CDbCommand’);
352 if(YII_DEBUG)
353 $message .= '. The SQL statement executed was: '.$this->getText().$par;
354 throw new CDbException(Yii::t(‘yii’,‘CDbCommand failed to execute the SQL statement: {error}’,
355 array(’{error}’=>$message)),(int)$e->getCode(),$errorInfo);
356 }
357 }
358
359 /**
360 * Executes the SQL statement and returns query result.
361 * This method is for executing an SQL query that returns result set.
362 * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
363 * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
364 * them in this way can improve the performance. Note that if you pass parameters in this way,
365 * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
366 * binding methods and the input parameters this way can improve the performance.
用的是YII 连接SQLSERVER 2008 PHP Version 5.4.3 +nginx