When I'm insert/update content (using fckeditor) with single apostrophe in my text, CDExeption is error:
CDbException
Description
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 'Yii'</p>',
`fulltext` = '<p>fulltext example</p>',' at line 3
Source File
C:wwwyiiframeworkdbCDbCommand.php(192)
00180: try
00181: {
00182: if($this->_statement instanceof PDOStatement)
00183: {
00184: $this->_statement->execute();
00185: return $this->_statement->rowCount();
00186: }
00187: else
00188: return $this->getConnection()->getPdoInstance()->exec($this->getText());
00189: }
00190: catch(Exception $e)
00191: {
00192: throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
00193: array('{error}'=>$e->getMessage())));
00194: }
00195: }
00196:
00197: /**
00198: * Executes the SQL statement and returns query result.
00199: * This method is for executing an SQL query that returns result set.
00200: * @return CDbDataReader the reader object for fetching the query result
00201: * @throws CException execution failed
00202: */
00203: public function query()
00204: {
Stack Trace
#0 C:wwwagovprotectedcontrollersContentController.php(266): CDbCommand->execute()
#1 C:wwwyiiframeworkwebactionsCInlineAction.php(32): ContentController->actionUpdate()
#2 C:wwwyiiframeworkwebCController.php(265): CInlineAction->run()
#3 C:wwwyiiframeworkwebfiltersCFilterChain.php(128): CController->runAction(Object(CInlineAction))
#4 C:wwwyiiframeworkwebfiltersCFilter.php(41): CFilterChain->run()
#5 C:wwwyiiframeworkwebCController.php(885): CFilter->filter(Object(CFilterChain))
#6 C:wwwyiiframeworkwebfiltersCInlineFilter.php(59): CController->filterAccessControl(Object(CFilterChain))
#7 C:wwwyiiframeworkwebfiltersCFilterChain.php(125): CInlineFilter->filter(Object(CFilterChain))
#8 C:wwwyiiframeworkwebCController.php(248): CFilterChain->run()
#9 C:wwwyiiframeworkwebCController.php(225): CController->runActionWithFilters(Object(CInlineAction), Array)
#10 C:wwwyiiframeworkwebCWebApplication.php(335): CController->run('update')
#11 C:wwwyiiframeworkwebCWebApplication.php(123): CWebApplication->runController('content/update')
#12 C:wwwyiiframeworkbaseCApplication.php(170): CWebApplication->processRequest()
#13 C:wwwagovindex.php(11): CApplication->run()
#14 {main}
2009-03-18 12:38:36 Apache/2.2.11 (Win32) PHP/5.2.9 Yii Framework/1.0.3