Using Functions/Objects in PHP's db2_bind_param

robing

New Member
I'm trying to bind some variables to a db2 query using db2_bind_param, but they're stored in an object and assigning them to temporary vars offends me. Is there a method of passing $obj->func($var) or $obj->property to the db2_bind_param function?eg.Works:\[code\]db2_bind_param($SQLStmt, 1, "var1", DB2_CHAR);...db2_execute($SQLStmt);\[/code\]Doesn't:\[code\]db2_bind_param($SQLStmt, 1, "obj->property", DB2_CHAR);db2_bind_param($SQLStmt, 1, "\$obj->property", DB2_CHAR);db2_bind_param($SQLStmt, 1, "{\$obj->property}", DB2_CHAR);db2_bind_param($SQLStmt, 1, "obj['property']", DB2_CHAR);...db2_execute($SQLStmt);\[/code\]Is this possible?
 
Back
Top