|
wb_pconnect | PHP Interface | wb_select_db |
This function will close/open a connection, cursor, LOB (Large Object, value of the database column of the BLOB, CLOB or NCLOB type) or a prepared SQL statement. If the connection was opened using the wb_pconnect function, it will not be closed, but the function will still return TRUE. This corresponds with persistent connection logic.
Connections, cursors, LOBs and prepared SQL statements do not need to be closed before the PHP script is done, the PHP module will close them after the page is generated according to the PHP script. You can however free resources consumed by these objects by explicitly closing them, but these resources are relatively small. Closing cursors is only needed when a PHP script needs to open many cursors (ten or more). You must close all LOBs that were opened from a cursor before explicitly closing the cursor. You have to close all cursors and prepared SQL statements that were opened using a connection before explicitly closing the database connection.
TRUE if succesful, FALSE otherwise.
$conn=wb_connect("wbserver", "_sysext", "Anonymous", ""); $res=wb_exec($conn, "select logname from Usertab where Ord(category)=CATEG_USER"); wb_result_all($res,"border=1"); wb_close($res); wb_close($conn);
wb_pconnect | PHP Interface | wb_select_db |