[propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 106 you have an error in your SQL syntax; check the manual that corresponds to you
server version for the right syntax to use near ‘Type=InnoDB’ at line 16
>> propel Running “insert-sql” phing task
[propel-sql-exec] Failed to execute:
[propel-sql-exec] 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 ‘Type=InnoDB’ at line 16
Some problems occurred when executing the task:
If the exception message is not clear enough, read the output of the task for more information
>> file- D:/xampp/htdocs/s…1_4/config/generated-schema.xml
The solution to this is
Edit the file D:/xampp/htdocs/symfony_1_4/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder/sql/mysql/MysqlDDLBuilder.php
Line 156, change
$script .= “Type=$mysqlTableType”;
to
$script .= “Engine=$mysqlTableType”;
2. Extract the source to /web/js/ directory of your symfony project directory
3. To use the editor in symfony, add (edit if present)the below line //config/settings.yml
.settings:
rich_text_fck_js_dir: js/fckeditor
4. You have to edit /web/js/fckeditor/fckconfig.js
var _FileBrowserLanguage = ‘php’ ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = ‘php’ ; // asp | aspx | cfm | lasso | php
Depending on the technology you are using you have to set the above two parameter
5. In newer versions of FCKEditor you also have to enable the PHP connector in file /web/js/fckeditor/editor/filemanager/connectors/php/config.php on line 28, and also set your upload directory (on line 32).
Suppose you want to execute query like
UPDATE tableName SET column1 = ‘abc’,column2 = ‘xyz’ WHERE column =’1′;
then you can use the below syntax to do so 🙂
—————————————————————————-
$con = Propel::getConnection();
/* Here you have to set the condition for which you need to update */
$c1 = new Criteria();
$c1->add(TableNamePeer::COLUMN_NAME, $conditionForColumn1);
/* Here you have to set the column value */
$c2 = new Criteria();
$c2->add(TableNamePeer::COLUMN_TO_UPDATE, $value);
You can set the meta tag information in your template file as below.
sfContext::getInstance()->getResponse()->setTitle(‘Your meta title here’);
sfContext::getInstance()->getResponse()->addMeta(‘description’,’ Meta description information’);
sfContext::getInstance()->getResponse()->addMeta(‘keywords’,’meta tag keywords seperated by commas’);