1999-04-22 00:25:57 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
| PHP Version 5 |
|
1999-04-22 00:25:57 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| Copyright (c) 1997-2006 The PHP Group |
|
1999-04-22 00:25:57 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2001-06-19 21:25:53 +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: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2001-06-19 21:25:53 +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-04-22 00:25:57 +00:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Authors: Danny Heijl <Danny.Heijl@cevi.be>, initial cut (ODS 7) |
|
|
|
|
| Christian Cartus <chc@idgruppe.de>, blobs, and IUS 9 |
|
2001-01-04 11:15:35 +00:00
|
|
|
| Jouni Ahto <jouni.ahto@exdec.fi>, configuration stuff |
|
2003-02-25 06:59:15 +00:00
|
|
|
| Corne' Cornelius <cornec@reach.co.za>, input descriptors |
|
1999-06-09 07:44:52 +00:00
|
|
|
| based on mysql code by: Zeev Suraski <zeev@php.net> |
|
1999-04-22 00:25:57 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2001-07-30 10:09:53 +00:00
|
|
|
*/
|
1999-04-22 00:25:57 +00:00
|
|
|
|
2001-07-30 10:09:53 +00:00
|
|
|
/* $Id$ */
|
1999-04-22 00:25:57 +00:00
|
|
|
|
2000-07-03 00:41:19 +00:00
|
|
|
#ifndef PHP_INFORMIX_H
|
|
|
|
#define PHP_INFORMIX_H
|
1999-04-22 00:25:57 +00:00
|
|
|
|
2000-02-12 14:38:31 +00:00
|
|
|
#ifdef PHP_WIN32
|
1999-07-21 12:48:35 +00:00
|
|
|
#define PHP_IFX_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define PHP_IFX_API
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_IFX /* with Informix */
|
|
|
|
|
1999-04-22 00:25:57 +00:00
|
|
|
#ifndef DLEXPORT
|
|
|
|
#define DLEXPORT
|
|
|
|
#endif
|
|
|
|
|
1999-07-21 12:48:35 +00:00
|
|
|
#ifdef ZTS
|
|
|
|
#include "TSRM.h"
|
|
|
|
#endif
|
1999-04-22 00:25:57 +00:00
|
|
|
|
1999-12-17 20:55:31 +00:00
|
|
|
extern zend_module_entry ifx_module_entry;
|
1999-04-22 00:25:57 +00:00
|
|
|
#define ifx_module_ptr &ifx_module_entry
|
|
|
|
|
1999-07-21 12:48:35 +00:00
|
|
|
/* user functions */
|
1999-07-27 11:29:36 +00:00
|
|
|
PHP_MINIT_FUNCTION(ifx);
|
|
|
|
PHP_RINIT_FUNCTION(ifx);
|
|
|
|
PHP_MSHUTDOWN_FUNCTION(ifx);
|
|
|
|
PHP_MINFO_FUNCTION(ifx);
|
1999-07-21 12:48:35 +00:00
|
|
|
/* functions common to all Informix versions */
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(ifx_connect);
|
|
|
|
PHP_FUNCTION(ifx_pconnect);
|
|
|
|
PHP_FUNCTION(ifx_close);
|
|
|
|
PHP_FUNCTION(ifx_query);
|
|
|
|
PHP_FUNCTION(ifx_prepare);
|
|
|
|
PHP_FUNCTION(ifx_do);
|
|
|
|
PHP_FUNCTION(ifx_error);
|
|
|
|
PHP_FUNCTION(ifx_errormsg);
|
|
|
|
PHP_FUNCTION(ifx_affected_rows);
|
|
|
|
PHP_FUNCTION(ifx_num_rows);
|
|
|
|
PHP_FUNCTION(ifx_num_fields);
|
|
|
|
PHP_FUNCTION(ifx_fetch_row);
|
|
|
|
PHP_FUNCTION(ifx_free_result);
|
|
|
|
PHP_FUNCTION(ifx_htmltbl_result);
|
|
|
|
PHP_FUNCTION(ifx_fieldtypes);
|
|
|
|
PHP_FUNCTION(ifx_fieldproperties);
|
1999-06-09 07:44:52 +00:00
|
|
|
PHP_FUNCTION(ifx_getsqlca);
|
1999-07-21 12:48:35 +00:00
|
|
|
/* BLOB related stuff, IDS & IUS only */
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(ifx_create_blob);
|
|
|
|
PHP_FUNCTION(ifx_free_blob) ;
|
|
|
|
PHP_FUNCTION(ifx_get_blob);
|
|
|
|
PHP_FUNCTION(ifx_update_blob);
|
|
|
|
PHP_FUNCTION(ifx_blobinfile_mode);
|
|
|
|
PHP_FUNCTION(ifx_copy_blob);
|
|
|
|
PHP_FUNCTION(ifx_textasvarchar);
|
|
|
|
PHP_FUNCTION(ifx_byteasvarchar);
|
|
|
|
PHP_FUNCTION(ifx_nullformat);
|
|
|
|
PHP_FUNCTION(ifx_create_char);
|
|
|
|
PHP_FUNCTION(ifx_free_char) ;
|
|
|
|
PHP_FUNCTION(ifx_update_char);
|
|
|
|
PHP_FUNCTION(ifx_get_char);
|
1999-04-22 00:25:57 +00:00
|
|
|
|
1999-07-21 12:48:35 +00:00
|
|
|
/* SLOB, CLOB : IUS only functions */
|
1999-04-22 00:25:57 +00:00
|
|
|
#if HAVE_IFX_IUS
|
1999-05-21 10:06:25 +00:00
|
|
|
PHP_FUNCTION(ifxus_create_slob);
|
|
|
|
PHP_FUNCTION(ifxus_free_slob) ;
|
|
|
|
PHP_FUNCTION(ifxus_close_slob) ;
|
|
|
|
PHP_FUNCTION(ifxus_open_slob) ;
|
|
|
|
PHP_FUNCTION(ifxus_read_slob);
|
|
|
|
PHP_FUNCTION(ifxus_write_slob);
|
|
|
|
PHP_FUNCTION(ifxus_seek_slob);
|
|
|
|
PHP_FUNCTION(ifxus_tell_slob);
|
1999-04-22 00:25:57 +00:00
|
|
|
#endif
|
|
|
|
|
2001-07-30 10:09:53 +00:00
|
|
|
ZEND_BEGIN_MODULE_GLOBALS(ifx)
|
1999-04-22 00:25:57 +00:00
|
|
|
long default_link;
|
2001-08-11 16:39:07 +00:00
|
|
|
long num_links, num_persistent;
|
|
|
|
long max_links, max_persistent;
|
1999-04-22 00:25:57 +00:00
|
|
|
long allow_persistent;
|
|
|
|
char *default_host, *default_user, *default_password;
|
|
|
|
int connectionid;
|
|
|
|
int cursorid;
|
2001-07-30 10:09:53 +00:00
|
|
|
int sv_sqlcode; /* saved informix SQLCODE value */
|
|
|
|
long blobinfile; /* 0=save in memory, 1=save in file */
|
|
|
|
long textasvarchar; /* 0=as id, 1=as varchar */
|
|
|
|
long byteasvarchar; /* 0=as id, 1=as varchar */
|
|
|
|
long charasvarchar; /* 0=don't strip trailing blanks, 1=strip */
|
|
|
|
long nullformat; /* 0=NULL as "", 1= NULL as "NULL" */
|
|
|
|
char nullvalue[1]; /* "" */
|
|
|
|
char nullstring[5]; /* "NULL" */
|
|
|
|
ZEND_END_MODULE_GLOBALS(ifx)
|
1999-07-21 12:48:35 +00:00
|
|
|
|
|
|
|
#ifdef ZTS
|
2001-07-30 20:50:54 +00:00
|
|
|
# define IFXG(v) TSRMG(ifx_globals_id, zend_ifx_globals *, v)
|
1999-07-21 12:48:35 +00:00
|
|
|
#else
|
|
|
|
# define IFXG(v) (ifx_globals.v)
|
|
|
|
#endif
|
|
|
|
|
2001-07-30 10:09:53 +00:00
|
|
|
#else /* not HAVE_IFX */
|
1999-04-22 00:25:57 +00:00
|
|
|
#define ifx_module_ptr NULL
|
|
|
|
#endif
|
1999-07-21 12:48:35 +00:00
|
|
|
#define phpext_informix_ptr ifx_module_ptr
|
2000-07-03 00:41:19 +00:00
|
|
|
#endif /* PHP_INFORMIX_H */
|