[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”;

14 thoughts on “mysql error while executing propel:insert-sql in symfony 1.4”
  1. Thaanks is working. For anyone out-there whoś not working you should run propel:build-sql and them propel:insert-sql

  2. I have been pulling my hair out for hours with this and this finally worked for me so thank you!

    Also thanks to Raulucco,

  3. I really tried to solve this problem since 3 days, but i couldn’t get any solution. I can’t found what’s actually problem.. Any idea…I tried all possible ways to resolve it but still nothing to get.

  4. Have you loaded PDO and PDO Mysql?
    Verify in your php.ini , if its enabled or not?
    Also make sure “xml” extension is enabled.

    Thanks
    Admin

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.