Example

<pdosqlexec url="pgsql:host=localhost dbname=test">
  <fileset dir="sqlfiles">
	  <include name="*.sql"/>
	  </fileset>
</pdosqlexec>
<pdosqlexec url="mysql:host=localhost;dbname=test" userid="username" password="password">
  <transaction src="path/to/sqlfile.sql"/>
  <formatter type="plain" outfile="path/to/output.txt"/>
  </pdosqlexec>

Note

Because of backwards compatiblity, the PDOSQLExecTask can also be called using the 'pdo' statement.

<pdo url="pgsql:host=localhost dbname=test">
  <fileset dir="sqlfiles">
	  <include name="*.sql"/>
  </fileset>

  <!-- xml formatter -->
  <formatter type="xml" output="output.xml"/>

  <!-- custom formatter -->
  <formatter classname="path.to.CustomFormatterClass">
    <param name="someClassAttrib" value="some-value"/>
  </formatter>

  <!-- No output file + usefile=false means it goes to phing log -->
  <formatter type="plain" usefile="false" />
</pdo>