cvs: /php3/functions oci8.c

From: Date: Mon, 22 Nov 1999 21:35:11 +0000
Subject: cvs: /php3/functions oci8.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-12944@lists.php.net to get a copy of this message
eschmid Mon Nov 22 16:35:11 1999 EDT Modified files: /php3/functions oci8.c Log: Looks now better. Thies have you forgotten some prototypes? Index: php3/functions/oci8.c diff -u php3/functions/oci8.c:1.127 php3/functions/oci8.c:1.128 --- php3/functions/oci8.c:1.127 Wed Nov 10 00:42:47 1999 +++ php3/functions/oci8.c Mon Nov 22 16:35:10 1999 @@ -33,7 +33,7 @@ #define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */ -/* $Id: oci8.c,v 1.127 1999/11/10 05:42:47 rasmus Exp $ */ +/* $Id: oci8.c,v 1.128 1999/11/22 21:35:10 eschmid Exp $ */ /* TODO list: * @@ -2286,10 +2286,8 @@ /************************* EXTENSION FUNCTIONS *************************/ -/* {{{ proto int OCIDefineByName(int stmt, string name, mixed &var [,int type]) - Define a PHP variable to an Oracle column by name. - if you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining!!! - */ +/* {{{ proto int OCIDefineByName(int stmt, string name, mixed &var [, int type]) + Define a PHP variable to an Oracle column by name. If you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining. */ PHP_FUNCTION(oci8_definebyname) { @@ -2349,10 +2347,8 @@ } /* }}} */ -/* {{{ proto int OCIBindByName(int stmt, string name, mixed &var, int maxlength [,int type]) - Bind a PHP variable to an Oracle placeholder by name. - if you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding!!! - */ +/* {{{ proto int OCIBindByName(int stmt, string name, mixed &var, int maxlength [, int type]) + Bind a PHP variable to an Oracle placeholder by name. If you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding. */ PHP_FUNCTION(oci8_bindbyname) { @@ -2781,10 +2777,9 @@ RETURN_FALSE; } /* }}} */ -/* {{{ proto string OCINewDescriptor(int connection [,int type ]) - initialize a new empty descriptor LOB/FILE (LOB is default) - */ +/* {{{ proto string OCINewDescriptor(int connection [, int type]) + Initialize a new empty descriptor LOB/FILE (LOB is default) */ PHP_FUNCTION(oci8_newdescriptor) { pval *conn, *type; @@ -2859,8 +2854,7 @@ /* }}} */ /* {{{ proto string OCIRollback(int conn) - rollback the current context - */ + Rollback the current context */ PHP_FUNCTION(oci8_rollback) { @@ -2892,10 +2886,9 @@ } /* }}} */ -/* {{{ proto string OCICommit(int conn) - commit the current context - */ +/* {{{ proto string OCICommit(int conn) + Commit the current context */ PHP_FUNCTION(oci8_commit) { pval *conn; @@ -2924,11 +2917,10 @@ RETURN_TRUE; } - /* }}} */ + /* {{{ proto string OCIColumnName(int stmt, int col) - Tell the name of a column. - */ + Tell the name of a column */ PHP_FUNCTION(oci8_columnname) { @@ -2952,12 +2944,10 @@ RETURN_STRINGL(outcol->name, outcol->name_len, 1); } - /* }}} */ -/* {{{ proto int OCIColumnSize(int stmt, int col) - Tell the maximum data size of a column. - */ +/* {{{ proto int OCIColumnSize(int stmt, int col) + Tell the maximum data size of a column */ PHP_FUNCTION(oci8_columnsize) { pval *stmt, *col; @@ -2979,12 +2969,10 @@ } RETURN_LONG(outcol->data_size); } - /* }}} */ -/* {{{ proto mixed OCIColumnType(int stmt, int col) - Tell the data type of a column. - */ +/* {{{ proto mixed OCIColumnType(int stmt, int col) + Tell the data type of a column */ PHP_FUNCTION(oci8_columntype) { pval *stmt, *col; @@ -3045,12 +3033,10 @@ RETVAL_LONG(outcol->data_type); } } - /* }}} */ -/* {{{ proto int OCIColumnIsNULL(int stmt, int col) - Tell whether a column is NULL. - */ +/* {{{ proto int OCIColumnIsNULL(int stmt, int col) + Tell whether a column is NULL */ PHP_FUNCTION(oci8_columnisnull) { pval *stmt, *col; @@ -3076,12 +3062,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto void OCIDebug(int onoff) - Toggle internal debugging output for the OCI extension. - */ +/* {{{ proto void OCIDebug(int onoff) + Toggle internal debugging output for the OCI extension */ /* Disables or enables the internal debug output. * By default it is disabled. */ @@ -3096,13 +3080,10 @@ convert_to_long(arg); OCI8_GLOBAL(php3_oci8_module).debug_mode = arg->value.lval; } - - /* }}} */ -/* {{{ proto int OCIExecute(int stmt [,int mode]) - Execute a parsed statement. - */ +/* {{{ proto int OCIExecute(int stmt [, int mode]) + Execute a parsed statement */ PHP_FUNCTION(oci8_execute) { pval *stmt,*mode; @@ -3131,12 +3112,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto int OCICancel(int stmt) - Prepare a new row of data for reading. - */ +/* {{{ proto int OCICancel(int stmt) + Prepare a new row of data for reading */ PHP_FUNCTION(oci8_cancel) { pval *stmt; @@ -3158,12 +3137,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto int OCIFetch(int stmt) - Prepare a new row of data for reading. - */ +/* {{{ proto int OCIFetch(int stmt) + Prepare a new row of data for reading */ PHP_FUNCTION(oci8_fetch) { pval *stmt; @@ -3186,12 +3163,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto int OCIFetchInto(int stmt, array &output [, int mode]) - Fetch a row of result data into an array. - */ +/* {{{ proto int OCIFetchInto(int stmt, array &output [, int mode]) + Fetch a row of result data into an array */ PHP_FUNCTION(oci8_fetchinto) { pval *stmt, *array, *element, *fmode; @@ -3290,12 +3265,10 @@ RETURN_LONG(statement->ncolumns); } - /* }}} */ -/* {{{ proto int OCIFetchStatement(int stmt, array &output) - Fetch all rows of result data into an array. - */ +/* {{{ proto int OCIFetchStatement(int stmt, array &output) + Fetch all rows of result data into an array */ PHP_FUNCTION(oci8_fetchstatement) { pval *stmt, *array, *element, *fmode, *tmp; @@ -3397,12 +3370,10 @@ RETURN_LONG(rows); } - /* }}} */ -/* {{{ proto int OCIFreeStatement(int stmt) - Free all resources associated with a statement. - */ +/* {{{ proto int OCIFreeStatement(int stmt) + Free all resources associated with a statement */ PHP_FUNCTION(oci8_freestatement) { pval *stmt; @@ -3422,14 +3393,12 @@ RETURN_TRUE; } - /* }}} */ -/* {{{ proto int OCILogoff(int conn) - Disconnect from database. - */ -/* Logs off and disconnects. - */ +/* {{{ proto int OCILogoff(int conn) + Disconnect from database */ + +/* Logs off and disconnects. */ PHP_FUNCTION(oci8_logout) { oci8_connection *connection; @@ -3465,11 +3434,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto int OCINLogon(string user, string pass[, string db]) - Connect to an Oracle database and log on. returns a new session. - */ + +/* {{{ proto int OCINLogon(string user, string pass [, string db]) + Connect to an Oracle database and log on. returns a new session */ /* Connects to an Oracle 8 database and logs on. If the * optional third parameter is not specified, PHP uses the environment @@ -3479,11 +3447,10 @@ { oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0,1); } - /* }}} */ -/* {{{ proto int OCILogon(string user, string pass[, string db]) - Connect to an Oracle database and log on. returns a new session. - */ + +/* {{{ proto int OCILogon(string user, string pass [, string db]) + Connect to an Oracle database and log on. returns a new session */ /* Connects to an Oracle 8 database and logs on. If the * optional third parameter is not specified, PHP uses the environment @@ -3493,12 +3460,11 @@ { oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0,0); } - /* }}} */ -/* {{{ proto int OCIPLogon(string user, string pass[, string db]) - Connect to an Oracle database using a persistent connection and log on. returns a new session. - */ +/* {{{ proto int OCIPLogon(string user, string pass [, string db]) + Connect to an Oracle database using a persistent connection and log on. Returns a new session. */ + /* Connects to an Oracle 8 database and logs on. If the * optional third parameter is not specified, PHP uses the environment * variable ORACLE_SID to determine which database to connect to. @@ -3507,12 +3473,10 @@ { oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1,0); } - /* }}} */ -/* {{{ proto int OCIError([int stmt|conn]) - Return the last error of stmt|conn|global. If no error happened returns false. - */ +/* {{{ proto int OCIError([int stmt|conn]) + Return the last error of stmt|conn|global. If no error happened returns false. */ PHP_FUNCTION(oci8_error) { pval *mixed; @@ -3563,12 +3527,10 @@ RETURN_FALSE; } } - /* }}} */ -/* {{{ proto int OCINumCols(int stmt) - Return the number of result columns in a statement. - */ +/* {{{ proto int OCINumCols(int stmt) + Return the number of result columns in a statement */ PHP_FUNCTION(oci8_numcols) { pval *stmt; @@ -3585,12 +3547,10 @@ } RETURN_LONG(statement->ncolumns); } - /* }}} */ -/* {{{ proto int OCIParse(int conn, string query) - Parse a query and return a statement. - */ +/* {{{ proto int OCIParse(int conn, string query) + Parse a query and return a statement */ PHP_FUNCTION(oci8_parse) { pval *conn, *query; @@ -3614,12 +3574,10 @@ query->value.str.len, list)); } - /* }}} */ -/* {{{ proto int OCIParse(int conn, string query) - Parse a query and return a statement. - */ +/* {{{ proto int OCIParse(int conn, string query) + Parse a query and return a statement */ PHP_FUNCTION(oci8_setprefetch) { pval *stmt, *size; @@ -3642,13 +3600,10 @@ RETURN_TRUE; } - /* }}} */ -/* {{{ proto int OCINewCursor(int conn) - return a new cursor (Statement-Handle) - use this to bind ref-cursors! - - */ +/* {{{ proto int OCINewCursor(int conn) + Return a new cursor (Statement-Handle) - use this to bind ref-cursors! */ PHP_FUNCTION(oci8_newcursor) { pval *conn; @@ -3671,12 +3626,10 @@ 0, list)); } - /* }}} */ -/* {{{ proto string OCIResult(int stmt, mixed column) - Return a single column of result data. - */ +/* {{{ proto string OCIResult(int stmt, mixed column) + Return a single column of result data */ PHP_FUNCTION(oci8_result) { pval *stmt, *col; @@ -3704,10 +3657,10 @@ oci8_make_pval(return_value,statement,outcol, "OCIResult",0); } - /* }}} */ + /* {{{ proto string OCIServerVersion(int conn) - Return a string containing server version information. */ + Return a string containing server version information */ PHP_FUNCTION(oci8_serverversion) { oci8_connection *connection; @@ -3737,13 +3690,12 @@ } RETURN_STRING(version,1); } - /* }}} */ /* XXX it would be better with a general interface to OCIAttrGet() */ /* {{{ proto int OCIStatementType(int stmt) - Return the query type of an OCI statement. */ + Return the query type of an OCI statement */ PHP_FUNCTION(oci8_statementtype) { pval *stmt; @@ -3836,7 +3788,6 @@ RETURN_LONG(rowcount); } - /* }}} */ #endif /* HAVE_OCI8 */

« previous php.dev (#12944) next »