CVS update: php3/functions
| From: | rasmus | Date: | Tue, 15 Dec 1998 16:44:04 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2810@lists.php.net to get a copy of this message | ||
Date: Tuesday December 15, 1998 @ 11:44
Author: rasmus
Update of /repository/php3/functions
In directory asf:/home/rasmus/php3/functions
Modified Files:
oracle.c
Log Message:
Prototype comments and a small bug fix in ora_bind()
Index: php3/functions/oracle.c
diff -c php3/functions/oracle.c:1.85 php3/functions/oracle.c:1.86
*** php3/functions/oracle.c:1.85 Thu Nov 26 05:53:08 1998
--- php3/functions/oracle.c Tue Dec 15 11:43:59 1998
***************
*** 357,371 ****
--- 357,377 ----
** PHP functions
*/
+ /* {{{ proto int ora_logon(string user, string password)
+ Open an Oracle connection */
void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
+ /* }}} */
+ /* {{{ proto int ora_plogon(string user, string password)
+ Open a persistant Oracle connection */
void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
+ /* }}} */
void php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
***************
*** 523,528 ****
--- 529,536 ----
return_value->type = IS_LONG;
}
+ /* {{{ proto int ora_logoff(int connection)
+ Close an Oracle connection */
void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
int type, ind;
***************
*** 544,550 ****
--- 552,561 ----
}
php3_list_delete(ind);
}
+ /* }}} */
+ /* {{{ proto int ora_open(int connection)
+ Open an Oracle cursor */
void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 578,585 ****
cursor->conn_ptr = conn;
RETURN_LONG(ora_add_cursor(list, cursor));
}
!
void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
--- 589,598 ----
cursor->conn_ptr = conn;
RETURN_LONG(ora_add_cursor(list, cursor));
}
+ /* }}} */
! /* {{{ proto int ora_close(int cursor)
! Close an Oracle cursor */
void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 593,600 ****
ora_del_cursor(list, arg->value.lval);
RETVAL_TRUE;
}
!
void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
--- 606,615 ----
ora_del_cursor(list, arg->value.lval);
RETVAL_TRUE;
}
! /* }}} */
+ /* {{{ proto int ora_commitoff(int connection)
+ Disable automatic commit */
void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 616,622 ****
--- 631,640 ----
}
RETURN_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_commiton(int connection)
+ Enable automatic commit */
void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 638,644 ****
--- 656,665 ----
}
RETURN_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_commit(int connection)
+ Commit an Oracle transaction */
void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 660,666 ****
--- 681,690 ----
}
RETVAL_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_rollback(int connection)
+ Roll back an Oracle transaction */
void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS)
{ /* conn_index */
pval *arg;
***************
*** 682,689 ****
}
RETVAL_TRUE;
}
!
void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
{
/* cursor_ind, sql_statement [, defer] */
--- 706,715 ----
}
RETVAL_TRUE;
}
! /* }}} */
+ /* {{{ proto int ora_parse(int cursor, string sql_statement [, int defer])
+ Parse an Oracle SQL statement */
void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
{
/* cursor_ind, sql_statement [, defer] */
***************
*** 736,742 ****
--- 762,771 ----
}
RETURN_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_bind(int cursor, string php_variable_name, string sql_parameter_name, int
length [, int type])
+ Bind a PHP variable to an Oracle parameter */
void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_ind, php_var_name, sql_var_name, data_len [, inout]*/
/* inout: 0 = in/out, 1 = in, 2 = out */
***************
*** 747,753 ****
char *paramname;
argc = ARG_COUNT(ht);
! if (argc < 4 || getParametersArray(ht, argc, argv) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_long(argv[0]);
--- 776,782 ----
char *paramname;
argc = ARG_COUNT(ht);
! if (argc < 4 || argc > 5 || getParametersArray(ht, argc, argv) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_long(argv[0]);
***************
*** 821,830 ****
--- 850,862 ----
cursor->nparams++;
RETURN_TRUE;
}
+ /* }}} */
/*
XXX Make return values compatible with old module ?
*/
+ /* {{{ proto int ora_exec(int cursor)
+ Execute a parsed statement */
void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index */
pval *arg;
***************
*** 865,871 ****
--- 897,906 ----
}
RETURN_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_numcols(int cursor)
+ Returns the numbers of columns in a result */
void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index */
pval *arg;
***************
*** 882,888 ****
--- 917,926 ----
RETURN_LONG(cursor->ncols);
}
+ /* }}} */
+ /* {{{ proto int ora_numrows(int cursor)
+ Returns the number of rows in a result */
void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index */
pval *arg;
***************
*** 899,907 ****
RETURN_LONG(cursor->cda.rpc);
}
/* prepares/executes/fetches 1st row if avail*/
!
void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS)
{
pval *argv[2];
--- 937,947 ----
RETURN_LONG(cursor->cda.rpc);
}
+ /* }}} */
/* prepares/executes/fetches 1st row if avail*/
! /* {{{ proto int ora_do(int connection, int cursor)
! Parse and execute a statement and fetch first result row */
void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS)
{
pval *argv[2];
***************
*** 980,986 ****
--- 1020,1029 ----
RETURN_LONG(ora_add_cursor(list, cursor));
}
+ /* }}} */
+ /* {{{ proto int ora_fetch(int cursor)
+ Fetch a row of result data from a cursor */
void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index */
pval *arg;
***************
*** 1012,1018 ****
--- 1055,1064 ----
cursor->fetched++;
RETVAL_TRUE;
}
+ /* }}} */
+ /* {{{ proto int ora_fetchinto(int cursor, array result)
+ Fetch a row into the specified result array */
void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index, array ref */
pval *arg1, *arr, tmp;
***************
*** 1094,1100 ****
--- 1140,1149 ----
RETURN_LONG(cursor->ncols);
}
+ /* }}} */
+ /* {{{ proto string ora_columnname(int cursor, int column)
+ Get the name of an Oracle result column */
void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index, column_index */
pval *argv[2];
***************
*** 1132,1138 ****
--- 1181,1190 ----
RETURN_STRINGL(cursor->columns[argv[1]->value.lval].cbuf,
cursor->columns[argv[1]->value.lval].cbufl,1);
}
+ /* }}} */
+ /* {{{ proto string ora_columntype(int cursor, int column)
+ Get the type of an Oracle result column */
void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index, column_index */
pval *argv[2];
***************
*** 1202,1208 ****
--- 1254,1263 ----
}
}
}
+ /* }}} */
+ /* {{{ proto int ora_columnsize(int cursor, int column)
+ Return the size of the column */
void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index, column_index */
pval *argv[2];
***************
*** 1239,1245 ****
--- 1294,1303 ----
RETURN_LONG(cursor->columns[argv[1]->value.lval].dbsize);
}
+ /* }}} */
+ /* {{{ proto mixed ora_getcolumn(int cursor, int column)
+ Get data from a fetched row */
void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS)
{ /* cursor_index, column_index */
pval *argv[2];
***************
*** 1330,1336 ****
--- 1388,1397 ----
}
}
}
+ /* }}} */
+ /* {{{ proto string ora_error(int cursor_or_connection)
+ Get an Oracle error message */
void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
***************
*** 1352,1359 ****
return_value->value.str.len = strlen(return_value->value.str.val);
}
}
!
void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
--- 1413,1422 ----
return_value->value.str.len = strlen(return_value->value.str.val);
}
}
! /* }}} */
+ /* {{{ proto int ora_errorcode(int cursor_or_connection)
+ Get an Oracle error code */
void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
***************
*** 1371,1377 ****
RETURN_LONG(conn->lda.rc);
}
}
!
void php3_info_oracle()
{
--- 1434,1440 ----
RETURN_LONG(conn->lda.rc);
}
}
! /* }}} */
void php3_info_oracle()
{
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net