[PHP-DEV] CVS update: php3/functions From: rasmus (php-dev <email protected>)
Date: 11/27/98

Date: Friday November 27, 1998 @ 9:57
Author: rasmus

Update of /repository/php3/functions
In directory asf:/export/home/rasmus/php3/functions

Modified Files:
        unified_odbc.c
Log Message:
Unified ODBC prototype comments and some doc fixes

Index: php3/functions/unified_odbc.c
diff -c php3/functions/unified_odbc.c:1.89 php3/functions/unified_odbc.c:1.90
*** php3/functions/unified_odbc.c:1.89 Sat Nov 14 10:39:44 1998
--- php3/functions/unified_odbc.c Fri Nov 27 09:57:09 1998
***************
*** 29,35 ****
     +----------------------------------------------------------------------+
   */
  
! /* $Id: unified_odbc.c,v 1.89 1998/11/14 15:39:44 rasmus Exp $ */
  
  /* This file is based on the Adabas D extension.
   * Adabas D will no longer be supported as separate module.
--- 29,35 ----
     +----------------------------------------------------------------------+
   */
  
! /* $Id: unified_odbc.c,v 1.90 1998/11/27 14:57:09 rasmus Exp $ */
  
  /* This file is based on the Adabas D extension.
   * Adabas D will no longer be supported as separate module.
***************
*** 534,540 ****
  }
  
  /* Main User Functions */
!
  UODBC_FUNCTION(close_all)
  {
          void *ptr;
--- 534,541 ----
  }
  
  /* Main User Functions */
! /* {{{ proto odbc_close_all(void)
! Close all ODBC connections */
  UODBC_FUNCTION(close_all)
  {
          void *ptr;
***************
*** 550,555 ****
--- 551,557 ----
                  }
          }
  }
+ /* }}} */
  
  void php3_uodbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
  {
***************
*** 584,598 ****
--- 586,606 ----
          RETURN_TRUE
  }
  
+ /* {{{ proto odbc_binmode(int result_id, int mode)
+ Handle binary column data */
  UODBC_FUNCTION(binmode)
  {
          php3_uodbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_longreadlen(int result_id, int length)
+ Handle LONG columns */
  UODBC_FUNCTION(longreadlen)
  {
          php3_uodbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
  }
+ /* }}} */
  
  int UODBC_BINDCOLS(UODBC_RESULT *result)
  {
***************
*** 653,658 ****
--- 661,668 ----
      return 1;
  }
  
+ /* {{{ proto odbc_prepare(int connection_id, string query)
+ Prepares a statement for execution */
  UODBC_FUNCTION(prepare)
  {
          pval *arg1, *arg2;
***************
*** 720,730 ****
          result->fetched = 0;
          RETURN_LONG(UODBC_ADD_RESULT(list, result));
  }
  
  /*
   * Execute prepared SQL statement. Supports only input parameters.
   */
!
  extern UODBC_FUNCTION(execute)
  {
      pval *arg1, *arg2, arr, *tmp;
--- 730,742 ----
          result->fetched = 0;
          RETURN_LONG(UODBC_ADD_RESULT(list, result));
  }
+ /* }}} */
  
  /*
   * Execute prepared SQL statement. Supports only input parameters.
   */
! /* {{{ proto odbc_execute(int result_id [, array parameters_array])
! Execute a prepared statement */
  extern UODBC_FUNCTION(execute)
  {
      pval *arg1, *arg2, arr, *tmp;
***************
*** 886,896 ****
                  RETVAL_TRUE;
          }
  }
  
  /* odbc_cursor simply returns a cursor name for the given stmt
   * Adabas automagically generates cursor names, other drivers may not
   */
!
  UODBC_FUNCTION(cursor)
  {
          pval *arg1;
--- 898,910 ----
                  RETVAL_TRUE;
          }
  }
+ /* }}} */
  
  /* odbc_cursor simply returns a cursor name for the given stmt
   * Adabas automagically generates cursor names, other drivers may not
   */
! /* {{{ proto odbc_cursor(int result_id)
! Get cursor name */
  UODBC_FUNCTION(cursor)
  {
          pval *arg1;
***************
*** 954,960 ****
--- 968,977 ----
                  RETVAL_FALSE;
          }
  }
+ /* }}} */
  
+ /* {{{ proto odbc_exec(int connection_id, string query)
+ Prepare and execute an SQL statement */
  UODBC_FUNCTION(exec)
  {
          pval *arg1, *arg2;
***************
*** 1050,1056 ****
--- 1067,1076 ----
          result->fetched = 0;
          RETURN_LONG(UODBC_ADD_RESULT(list, result));
  }
+ /* }}} */
  
+ /* {{{ proto odbc_fetch_into(int result_id [, int rownumber], array result_array)
+ Fetch one result row into an array */
  UODBC_FUNCTION(fetch_into)
  {
          int res_ind, numArgs, i;
***************
*** 1196,1201 ****
--- 1216,1222 ----
          if (buf) efree(buf);
          RETURN_LONG(result->numcols);
  }
+ /* }}} */
  
  #if HAVE_SOLID
  void php3_solid_fetch_prev(INTERNAL_FUNCTION_PARAMETERS)
***************
*** 1231,1237 ****
          RETURN_TRUE;
  }
  #endif
!
  UODBC_FUNCTION(fetch_row)
  {
          int res_ind, numArgs;
--- 1252,1260 ----
          RETURN_TRUE;
  }
  #endif
!
! /* {{{ proto odbc_fetch_row(int result_id [, int row_number])
! Fetch a row */
  UODBC_FUNCTION(fetch_row)
  {
          int res_ind, numArgs;
***************
*** 1290,1296 ****
--- 1313,1322 ----
          
          RETURN_TRUE;
  }
+ /* }}} */
  
+ /* {{{ proto odbc_result(int result_id, mixed field)
+ Get result data */
  UODBC_FUNCTION(result)
  {
          char *field;
***************
*** 1473,1479 ****
--- 1499,1508 ----
          }
          RETURN_TRUE;
  }
+ /* }}} */
  
+ /* {{{ proto odbc_result_all(int result_id [, string format])
+ Print result as HTML table */
  UODBC_FUNCTION(result_all)
  {
          char *buf = NULL;
***************
*** 1603,1609 ****
--- 1632,1641 ----
      if (buf) efree(buf);
          RETURN_LONG(result->fetched);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_free_result(int result_id)
+ Free resources associated with a result */
  UODBC_FUNCTION(free_result)
  {
          pval *arg1;
***************
*** 1615,1630 ****
--- 1647,1669 ----
          UODBC_DEL_RESULT(list, arg1->value.lval);
          RETURN_TRUE;
  }
+ /* }}} */
  
+ /* {{{ proto odbc_connect(string DSN, string user, string password [, int cursor_option])
+ Connect to a datasource */
  UODBC_FUNCTION(connect)
  {
          PHP3_UODBC_DO_CONNECT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_connect(string DSN, string user, string password [, int cursor_option])
+ Establish a persistant connection to a datasource */
  UODBC_FUNCTION(pconnect)
  {
          PHP3_UODBC_DO_CONNECT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
  }
+ /* }}} */
  
  /* Persistent connections: two list-types le_pconn, le_conn and a plist
   * where hashed connection info is stored together with index pointer to
***************
*** 1870,1875 ****
--- 1909,1916 ----
          return_value->type = IS_LONG;
  }
  
+ /* {{{ proto odbc_close(int connection_id)
+ Close an ODBC connection */
  UODBC_FUNCTION(close)
  {
          pval *arg1;
***************
*** 1890,1896 ****
--- 1931,1940 ----
          }
          php3_list_delete(ind);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_num_rows(int result_id)
+ Get number of rows in a result */
  UODBC_FUNCTION(num_rows)
  {
          UODBC_RESULT *result;
***************
*** 1910,1916 ****
--- 1954,1963 ----
          SQLRowCount(result->stmt, &rows);
          RETURN_LONG(rows);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_num_fields(int result_id)
+ Get number of columns in a result */
  UODBC_FUNCTION(num_fields)
  {
          UODBC_RESULT *result;
***************
*** 1927,1933 ****
--- 1974,1983 ----
          }
          RETURN_LONG(result->numcols);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_field_name(int result_id, int field_number)
+ Get a column name */
  UODBC_FUNCTION(field_name)
  {
          UODBC_RESULT *result;
***************
*** 1961,1967 ****
--- 2011,2020 ----
          
          RETURN_STRING(result->values[arg2->value.lval - 1].name,1)
  }
+ /* }}} */
  
+ /* {{{ proto odbc_field_type(int result_id, int field_number)
+ Get the datatype of a column */
  UODBC_FUNCTION(field_type)
  {
          UODBC_RESULT *result;
***************
*** 1994,2000 ****
--- 2047,2056 ----
                                           SQL_COLUMN_TYPE_NAME, tmp, 31, &tmplen, NULL);
          RETURN_STRING(tmp,1)
  }
+ /* }}} */
  
+ /* {{{ proto odbc_field_len(int result_id, int field_number)
+ Get the length of a column */
  UODBC_FUNCTION(field_len)
  {
          UODBC_RESULT *result;
***************
*** 2026,2032 ****
--- 2082,2091 ----
          
          RETURN_LONG(len);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_field_num(int result_id, string field_name)
+ Return column number */
  UODBC_FUNCTION(field_num)
  {
          int field_ind;
***************
*** 2060,2066 ****
--- 2119,2128 ----
                  RETURN_FALSE;
          RETURN_LONG(field_ind);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_autocommit(int connection_id, int OnOff)
+ Toggle autocommit mode */
  UODBC_FUNCTION(autocommit)
  {
          UODBC_CONNECTION *curr_conn;
***************
*** 2110,2115 ****
--- 2172,2178 ----
                  RETVAL_LONG((long)status);
          }
  }
+ /* }}} */
  
  void PHP3_UODBC_TRANSACT(INTERNAL_FUNCTION_PARAMETERS, int type)
  {
***************
*** 2137,2153 ****
          RETURN_TRUE;
  }
  
  UODBC_FUNCTION(commit)
  {
          PHP3_UODBC_TRANSACT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
  }
  
  UODBC_FUNCTION(rollback)
  {
          PHP3_UODBC_TRANSACT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
  }
!
  
  UODBC_FUNCTION(setoption)
  {
          UODBC_CONNECTION *curr_conn;
--- 2200,2223 ----
          RETURN_TRUE;
  }
  
+ /* {{{ proto odbc_commit(int connection_id)
+ Commit an ODBC transaction */
  UODBC_FUNCTION(commit)
  {
          PHP3_UODBC_TRANSACT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
  }
+ /* }}} */
  
+ /* {{{ proto odbc_rollback(int connection_id)
+ Rollback a transaction */
  UODBC_FUNCTION(rollback)
  {
          PHP3_UODBC_TRANSACT(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
  }
! /* }}} */
  
+ /* {{{ proto odbc_setoption(??)
+ ?? */
  UODBC_FUNCTION(setoption)
  {
          UODBC_CONNECTION *curr_conn;
***************
*** 2193,2199 ****
  
          RETURN_TRUE;
  }
!
  
  #endif /* HAVE_UODBC */
  
--- 2263,2269 ----
  
          RETURN_TRUE;
  }
! /* }}} */
  
  #endif /* HAVE_UODBC */
  

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>