Search code examples
mysqlphing

`<` character in exec task is breaking my Phing build script


I'm trying to setup an mysql import script in Phing, but the "<" is causing XML errors. Any ideas?

<exec command="mysql -u${mysql.username} -p${mysql.password} -h ${mysql.server} ${mysql.database} < ${sql.file}" />

I'm looking at making dbDeploy doing this, but it'd be great if there was an easy way for this to work (single line command versus the multi-line setup of dbDeploy)


Solution

  • Escape the character by replacing it with &lt;