db2_set_option
PECL ibm_db2 >= 1.0.0
db2_set_option - Set options for connection or statement resources
Example #1 Setting one parameter with a connection resource
Result: Options Set Successfully
Example #2 Setting multiple parameters with a connection resource
Result: Options Set Successfully
Example #3 Setting multiple parameters with an invalid key
Result: Could Not Set Options
Example #4 Setting multiple parameters with an invalid value
Result: Could Not Set Options
Example #5 Setting multiple parameters with a connection resource and the wrong type
Result: Could Not Set Options
Example #6 Setting multiple parameters with the wrong resource
Result: Could Not Set Options
Example #7 Putting it all together
Result: Array
(
[empno] => 000140
[firstnme] => HEATHER
[midinit] => A
[lastname] => NICHOLLS
[workdept] => C01
[phoneno] => 1793
[hiredate] => 1976-12-15
[job] => ANALYST
[edlevel] => 18
[sex] => F
[birthdate] => 1946-01-19
[salary] => 28420.00
[bonus] => 600.00
[comm] => 2274.00
)
Array
(
[empno] => 000130
[firstnme] => DELORES
[midinit] => M
[lastname] => QUINTANA
[workdept] => C01
[phoneno] => 4578
[hiredate] => 1971-07-28
[job] => ANALYST
[edlevel] => 16
[sex] => F
[birthdate] => 1925-09-15
[salary] => 23800.00
[bonus] => 500.00
[comm] => 1904.00
)
Example #8 i5/OS cursors are read-only
Result: first2 last2