+++ /dev/null
---------------------------------------------------------------------
- The DBX License, version 0.01
-Copyright (c) 2001 Guidance bv. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- 3. The name "DBX" must not be used to endorse or promote products
- derived from this software without prior permission from
- Guidance bv. This does not apply to add-on libraries or tools
- that work in conjunction with DBX. In such a case the DBX
- name may be used to indicate that the product supports DBX.
-
- 4. Guidance bv may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the
- terms of that version. You may also choose to use such covered
- code under the terms of any subsequent version of the license
- published by Guidance bv. No one other than Guidance bv has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 5. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes DBX, freely available from
- http://www.guidance.nl/dbx".
-
- 6. The software is an add-on to PHP, which is freely available from
- http://www.php.net. Be sure to read their license as well.
-
-
-THIS SOFTWARE IS PROVIDED BY GUIDANCE BV ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GUIDANCE BV
- OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-Guidance bv can be contacted via Email at m.boeren@guidance.nl.
-
-For more information on Guidance bv and the DBX project,
-please see <http://www.guidance.nl>.
-
-The software is an add-on to the PHP project, whihc consists of
-voluntary contributions made by many individuals on behalf of the
-PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see <http://www.php.net>.
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#include "php.h"
#include "php_ini.h"
-#include "php_config.h"
#include "php_dbx.h"
#include "ext/standard/info.h"
+#if !(WIN32|WINNT)
+#include "php_config.h"
+#endif
/*/ defines for supported databases /*/
#define DBX_UNKNOWN 0
if (call_user_function_ex(EG(function_table), NULL, zval_function_name, returnvalue, number_of_arguments, params, 0, NULL) == FAILURE) {
zend_error(E_ERROR, "function '%s' not found", zval_function_name->value.str.val);
}
- zval_dtor(zval_function_name); // to free stringvalue memory
+ zval_dtor(zval_function_name); /*/ to free stringvalue memory /*/
FREE_ZVAL(zval_function_name);
}
/*/ DISPLAY_INI_ENTRIES(); /*/
}
/*/
-//
-// actual implementation of the dbx functions
-//
-//
-//
-//
+/ /
+/ / actual implementation of the dbx functions
+/ /
+/ /
+/ /
+/ /
/*/
/* {{{ proto dbx_handle_object dbx_connect(string module_name, string host, string db, string username, string password [, bool persistent])
returns a dbx_handle_object on success
}
}
/*/
-// if (ZEND_NUM_ARGS()>3) {
-// convert_to_long_ex(arguments[3]);
-// result_row_offset = (*arguments[3])->value.lval;
-// }
-// if (ZEND_NUM_ARGS()>4) {
-// convert_to_long_ex(arguments[4]);
-// result_row_count = (*arguments[4])->value.lval;
-// }
+/ / if (ZEND_NUM_ARGS()>3) {
+/ / convert_to_long_ex(arguments[3]);
+/ / result_row_offset = (*arguments[3])->value.lval;
+/ / }
+/ / if (ZEND_NUM_ARGS()>4) {
+/ / convert_to_long_ex(arguments[4]);
+/ / result_row_count = (*arguments[4])->value.lval;
+/ / }
/*/
MAKE_STD_ZVAL(rv_result_handle);
convert_to_string_ex(arguments[1]);
RETURN_LONG(result?1:0);
}
/*/ if you get here, the query succeeded and returned results, so we'll return them
- // rv_result_handle holds a resource
+ / / rv_result_handle holds a resource
/*/
/*/ init return_value as object (of rows) /*/
if (object_init(return_value) != SUCCESS) {
}
}
/*/
-// }
-// else {
-// FREE_ZVAL(rv_row);
-// }
+/ / }
+/ / else {
+/ / FREE_ZVAL(rv_row);
+/ / }
/*/
++row_count;
}
}
/* }}} */
/*/
-/////////// dbx functions that are database independent... like sorting result_objects!
+/ / dbx functions that are database independent... like sorting result_objects!
/*/
/* {{{ proto long dbx_cmp_asc(array row_x, array row_y, string columnname)
returns row_x[columnname] - row_y[columnname], converted to -1, 0 or 1
RETURN_LONG(1);
}
-/*///////////////*/
+/***********************************/
/* {{{ proto long dbx_test(???)
*/
/*/
-// switch_dbx functions
+/ / switch_dbx functions
/*/
int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
/*/ returns connection handle as resource on success or 0 as long on failure /*/
# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_dbx" /D ZTS=1 /YX /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "dbx_EXPORTS" /D "COMPILE_DL_dbx" /D ZTS=1 /D HAVE_LIBINTL=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "DBX_EXPORTS" /D "COMPILE_DL_DBX" /D ZTS=1 /D HAVE_LIBINTL=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /c\r
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
# ADD BASE RSC /l 0x406 /d "NDEBUG"\r
# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_dbx" /D ZTS=1 /YX /FD /c\r
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "dbx_EXPORTS" /D "COMPILE_DL_dbx" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LIBINTL=1 /FR /YX /FD /c\r
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DBX_EXPORTS" /D "COMPILE_DL_DBX" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_LIBINTL=1 /FR /YX /FD /c\r
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
# ADD BASE RSC /l 0x406 /d "NDEBUG"\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=.\x\dbx_mysql.h\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=.\dbx_odbc.h\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=.\x\dbx_odbc.h\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=.\php_dbx.h\r
# End Source File\r
# End Group\r
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#ifndef ZEND_DBX_H
#define ZEND_DBX_H
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#include "dbx.h"
#include "dbx_mysql.h"
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#ifndef ZEND_DBX_MYSQL_H
#define ZEND_DBX_MYSQL_H
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#include "dbx.h"
#include "dbx_odbc.h"
}
int dbx_odbc_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
- /*/ returns empty string // no equivalent in odbc module (yet???) /*/
+ /*/ returns empty string, no equivalent in odbc module (yet???) /*/
ZVAL_EMPTY_STRING((*rv));
return 1;
}
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#ifndef ZEND_DBX_ODBC_H
#define ZEND_DBX_ODBC_H
/*
+----------------------------------------------------------------------+
- | stentor module version 1.0 |
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | dbx module version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001 Guidance Rotterdam BV |
+----------------------------------------------------------------------+
- | This source file is subject to version 1.0 of the STENTOR license, |
+ | This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at |
- | http://www.guidance.nl/php/dbx/license/1_00.txt. |
- | If you did not receive a copy of the STENTOR license and are unable |
- | to obtain it through the world-wide-web, please send a note to |
- | license@guidance.nl so we can mail you a copy immediately. |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | 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. |
+----------------------------------------------------------------------+
| Author : Marc Boeren <marc@guidance.nl> |
+----------------------------------------------------------------------+
- */
+*/
#ifndef ZEND_PHP_DBX_H
#define ZEND_PHP_DBX_H