db2_execute

PECL ibm_db2 >= 1.0.0
db2_execute - Executes a prepared SQL statement
Manual
Code Examples

Example #1 Preparing and executing an SQL statement with parameter markers

Result: Successfully added new pet.
PHP Version:

Example #2 Calling a stored procedure with an OUT parameter

Result: I have 7 pets!
PHP Version:

Example #3 Returning XML data as an SQL ResultSet

Result: 1000 Kathy Smith 416-555-1358 1001 Kathy Smith 905-555-7258
PHP Version:

Example #4 Performing a "JOIN" with XML data

Result: 1001 Kathy Smith 905-555-7258 5002 Shipped
PHP Version:

Example #5 Returning SQL data as part of a larger XML document

Result: <promoList xmlns="http://posample.org"> <promoitem> <product pid="100-100-01"> <description> <name>Snow Shovel, Basic 22 inch</name> <details>Basic Snow Shovel, 22 inches wide, straight handle with D-Grip</details> <price>9.99</price> <weight>1 kg</weight> </description> </product> <startdate>2004-11-19</startdate> <enddate>2004-12-19</enddate> <promoprice>7.25</promoprice> </promoitem> </promoList>
PHP Version: