1999-09-05 13:01:42 +00:00
|
|
|
|
/*
|
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
|
| PHP Version 5 |
|
1999-09-05 13:01:42 +00:00
|
|
|
|
+----------------------------------------------------------------------+
|
2005-08-03 14:08:58 +00:00
|
|
|
|
| Copyright (c) 1997-2005 The PHP Group |
|
1999-09-05 13:01:42 +00:00
|
|
|
|
+----------------------------------------------------------------------+
|
2003-06-10 20:04:29 +00:00
|
|
|
|
| This source file is subject to version 3.0 of the PHP license, |
|
2000-07-24 01:40:02 +00:00
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
|
| available through the world-wide-web at the following url: |
|
|
|
|
|
| http://www.php.net/license/3_0.txt. |
|
2000-07-24 01:40:02 +00:00
|
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
1999-09-05 13:01:42 +00:00
|
|
|
|
+----------------------------------------------------------------------+
|
2003-03-18 12:06:09 +00:00
|
|
|
|
| Authors: Stig S<EFBFBD>ther Bakken <ssb@php.net> |
|
1999-09-05 13:01:42 +00:00
|
|
|
|
| Andreas Karajannis <Andreas.Karajannis@gmd.de> |
|
2003-07-14 16:11:38 +00:00
|
|
|
|
| Kevin N. Shallow <kshallow@tampabay.rr.com> (Birdstep) |
|
1999-09-05 13:01:42 +00:00
|
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
|
*/
|
1999-09-05 13:01:42 +00:00
|
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
|
#ifndef PHP_ODBC_H
|
|
|
|
|
#define PHP_ODBC_H
|
1999-09-05 13:01:42 +00:00
|
|
|
|
|
|
|
|
|
#if HAVE_UODBC
|
2000-05-11 11:46:06 +00:00
|
|
|
|
#define ODBCVER 0x0250
|
2002-06-14 00:07:16 +00:00
|
|
|
|
|
1999-10-07 18:49:41 +00:00
|
|
|
|
#ifdef ZTS
|
|
|
|
|
#include "TSRM.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-12-17 20:55:31 +00:00
|
|
|
|
extern zend_module_entry odbc_module_entry;
|
1999-09-05 13:01:42 +00:00
|
|
|
|
#define odbc_module_ptr &odbc_module_entry
|
|
|
|
|
|
2005-04-14 21:17:20 +00:00
|
|
|
|
#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
|
2003-04-30 10:45:45 +00:00
|
|
|
|
# define PHP_ODBC_HAVE_FETCH_HASH 1
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-09-05 13:01:42 +00:00
|
|
|
|
/* user functions */
|
2001-07-30 01:56:43 +00:00
|
|
|
|
PHP_MINIT_FUNCTION(odbc);
|
|
|
|
|
PHP_MSHUTDOWN_FUNCTION(odbc);
|
|
|
|
|
PHP_RINIT_FUNCTION(odbc);
|
|
|
|
|
PHP_RSHUTDOWN_FUNCTION(odbc);
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_MINFO_FUNCTION(odbc);
|
|
|
|
|
|
2001-01-15 01:11:06 +00:00
|
|
|
|
PHP_FUNCTION(odbc_error);
|
|
|
|
|
PHP_FUNCTION(odbc_errormsg);
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_setoption);
|
|
|
|
|
PHP_FUNCTION(odbc_autocommit);
|
|
|
|
|
PHP_FUNCTION(odbc_close);
|
|
|
|
|
PHP_FUNCTION(odbc_close_all);
|
|
|
|
|
PHP_FUNCTION(odbc_commit);
|
|
|
|
|
PHP_FUNCTION(odbc_connect);
|
|
|
|
|
PHP_FUNCTION(odbc_pconnect);
|
|
|
|
|
PHP_FUNCTION(odbc_cursor);
|
2003-05-02 00:40:20 +00:00
|
|
|
|
#ifdef HAVE_SQLDATASOURCES
|
2002-08-11 23:39:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_data_source);
|
2003-05-02 00:40:20 +00:00
|
|
|
|
#endif
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_do);
|
2002-08-11 23:39:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_exec);
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_execute);
|
2003-04-30 10:45:45 +00:00
|
|
|
|
#ifdef PHP_ODBC_HAVE_FETCH_HASH
|
2000-07-06 08:38:12 +00:00
|
|
|
|
PHP_FUNCTION(odbc_fetch_array);
|
|
|
|
|
PHP_FUNCTION(odbc_fetch_object);
|
|
|
|
|
#endif
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_fetch_into);
|
|
|
|
|
PHP_FUNCTION(odbc_fetch_row);
|
|
|
|
|
PHP_FUNCTION(odbc_field_len);
|
2000-05-11 11:46:06 +00:00
|
|
|
|
PHP_FUNCTION(odbc_field_scale);
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_field_name);
|
|
|
|
|
PHP_FUNCTION(odbc_field_type);
|
|
|
|
|
PHP_FUNCTION(odbc_field_num);
|
|
|
|
|
PHP_FUNCTION(odbc_free_result);
|
2001-06-19 17:58:09 +00:00
|
|
|
|
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
|
2001-03-09 23:44:55 +00:00
|
|
|
|
PHP_FUNCTION(odbc_next_result);
|
2001-06-19 17:58:09 +00:00
|
|
|
|
#endif
|
1999-09-05 13:01:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_num_fields);
|
|
|
|
|
PHP_FUNCTION(odbc_num_rows);
|
|
|
|
|
PHP_FUNCTION(odbc_prepare);
|
|
|
|
|
PHP_FUNCTION(odbc_result);
|
|
|
|
|
PHP_FUNCTION(odbc_result_all);
|
|
|
|
|
PHP_FUNCTION(odbc_rollback);
|
|
|
|
|
PHP_FUNCTION(odbc_binmode);
|
|
|
|
|
PHP_FUNCTION(odbc_longreadlen);
|
Added support for metadata functions, odbc_tables, odbc_columns,
odbc_columnprivileges, odbc_foreignkeys, odbc_gettypeinfo,
odbc_primarykeys, odbc_procedurecolumns, odbc_procedures,
odbc_procedurecolumns, odbc_procedures, odbc_specialcolumns,
odbc_statistics, odbc_tableprivileges
1999-09-22 21:14:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_tables);
|
|
|
|
|
PHP_FUNCTION(odbc_columns);
|
2000-06-30 19:22:52 +00:00
|
|
|
|
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_35) /* not supported now */
|
Added support for metadata functions, odbc_tables, odbc_columns,
odbc_columnprivileges, odbc_foreignkeys, odbc_gettypeinfo,
odbc_primarykeys, odbc_procedurecolumns, odbc_procedures,
odbc_procedurecolumns, odbc_procedures, odbc_specialcolumns,
odbc_statistics, odbc_tableprivileges
1999-09-22 21:14:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_columnprivileges);
|
1999-12-11 10:56:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_tableprivileges);
|
|
|
|
|
#endif
|
2000-06-30 19:22:52 +00:00
|
|
|
|
#if !defined(HAVE_SOLID) || !defined(HAVE_SOLID_35) /* not supported */
|
Added support for metadata functions, odbc_tables, odbc_columns,
odbc_columnprivileges, odbc_foreignkeys, odbc_gettypeinfo,
odbc_primarykeys, odbc_procedurecolumns, odbc_procedures,
odbc_procedurecolumns, odbc_procedures, odbc_specialcolumns,
odbc_statistics, odbc_tableprivileges
1999-09-22 21:14:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_foreignkeys);
|
1999-12-11 10:56:42 +00:00
|
|
|
|
PHP_FUNCTION(odbc_procedures);
|
|
|
|
|
PHP_FUNCTION(odbc_procedurecolumns);
|
|
|
|
|
#endif
|
Added support for metadata functions, odbc_tables, odbc_columns,
odbc_columnprivileges, odbc_foreignkeys, odbc_gettypeinfo,
odbc_primarykeys, odbc_procedurecolumns, odbc_procedures,
odbc_procedurecolumns, odbc_procedures, odbc_specialcolumns,
odbc_statistics, odbc_tableprivileges
1999-09-22 21:14:03 +00:00
|
|
|
|
PHP_FUNCTION(odbc_gettypeinfo);
|
|
|
|
|
PHP_FUNCTION(odbc_primarykeys);
|
|
|
|
|
PHP_FUNCTION(odbc_specialcolumns);
|
|
|
|
|
PHP_FUNCTION(odbc_statistics);
|
1999-09-05 13:01:42 +00:00
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
2002-06-14 00:07:16 +00:00
|
|
|
|
#define odbc_module_ptr NULL
|
1999-09-05 13:01:42 +00:00
|
|
|
|
|
|
|
|
|
#endif /* HAVE_UODBC */
|
|
|
|
|
|
|
|
|
|
#define phpext_odbc_ptr odbc_module_ptr
|
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
|
#endif /* PHP_ODBC_H */
|
1999-09-05 13:01:42 +00:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Local variables:
|
|
|
|
|
* tab-width: 4
|
|
|
|
|
* c-basic-offset: 4
|
|
|
|
|
* End:
|
|
|
|
|
*/
|