Published:
February 26, 2011mysql error while executing propel:insert-sql in symfony 1.4
[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:
CREATE TABLE `tblName`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`description` TEXT,
`image` VARCHAR(255),
`created_at` DATETIME,
PRIMARY KEY (`id`),
)Type=InnoDB
[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”;