CVS update: php3/functions
| From: | danny | Date: | Thu, 04 Mar 1999 19:19:02 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4475@lists.php.net to get a copy of this message | ||
Date: Thursday March 4, 1999 @ 14:19
Author: danny
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv5566/functions
Modified Files:
ifx.ec
Log Message:
- Added some more "SET CONNECTION" statements so that you can fetch rows etc...
from different databases simultaneously (query was already OK).
Index: php3/functions/ifx.ec
diff -c php3/functions/ifx.ec:1.38 php3/functions/ifx.ec:1.39
*** php3/functions/ifx.ec:1.38 Mon Jan 4 02:38:14 1999
--- php3/functions/ifx.ec Thu Mar 4 14:19:00 1999
***************
*** 30,36 ****
+----------------------------------------------------------------------+
*/
! /* $Id: ifx.ec,v 1.38 1999/01/04 07:38:14 jah Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
--- 30,36 ----
+----------------------------------------------------------------------+
*/
! /* $Id: ifx.ec,v 1.39 1999/03/04 19:19:00 danny Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
***************
*** 83,89 ****
- minor bug-fixes
- Test-Page (informix_blob.php3) updated
- begin with coding of slob-support(still deactivated, not yet complete: #undef HAVE_IFX_IUS in
php3_ifx.h)
! - ifx_fetch_row returns always a blob-id (contains "NULL"-flag or content from
db)(except ifx_textasvarchar, ifx_byteasvarchar set to 1)
Changes 14.9.1998 (chc@idgruppe.de)
- supports now IUS- serial8,int8,boolean, nchar, nvchar, lvarchar
--- 83,90 ----
- minor bug-fixes
- Test-Page (informix_blob.php3) updated
- begin with coding of slob-support(still deactivated, not yet complete: #undef HAVE_IFX_IUS in
php3_ifx.h)
! - ifx_fetch_row returns always a blob-id (contains "NULL"-flag or content from db)
! (except ifx_textasvarchar, ifx_byteasvarchar set to 1)
Changes 14.9.1998 (chc@idgruppe.de)
- supports now IUS- serial8,int8,boolean, nchar, nvchar, lvarchar
***************
*** 93,103 ****
- cursory and non-cursory stored procedures
Changes 24.10.1998 (chc@idgruppe.de)
! - changes the internal structure of IFX_BLOB and IFX_SLOB into one structure. it is now prepared
for general-id-usage
- fixed a lvarchar-bug (i hate esql/c)
Changes 12.11.1998 (danny.heijl@cevi.be)
- added proto comments
*/
--- 94,110 ----
- cursory and non-cursory stored procedures
Changes 24.10.1998 (chc@idgruppe.de)
! - changes the internal structure of IFX_BLOB and IFX_SLOB into one structure.
! it is now prepared for general-id-usage.
- fixed a lvarchar-bug (i hate esql/c)
Changes 12.11.1998 (danny.heijl@cevi.be)
- added proto comments
+
+ Changes 04/03/1999 (danny.heijl@cevi.be)
+ - added "SET CONNECTION" statement to ifx_fetch_row() so that you can now fetch rows
from different databases
+ simultaneously (ifx_query() & ifx_prepare() were already OK).
+
*/
***************
*** 1636,1641 ****
--- 1643,1656 ----
descrpid = Ifx_Result->descrpid;
fieldcount = Ifx_Result->numcols;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
if (Ifx_Result->iscursory < 0) {
php3_error(E_WARNING, "Resultindex %d is not a prepared query",
***************
*** 2024,2029 ****
--- 2039,2054 ----
descrpid = Ifx_Result->descrpid;
fieldcount = Ifx_Result->numcols;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
+
+
if (! Ifx_Result->isscroll) {
EXEC SQL FETCH :cursorid USING SQL DESCRIPTOR :descrpid;
} else {
***************
*** 2400,2405 ****
--- 2425,2440 ----
descrpid = Ifx_Result->descrpid;
fieldcount = Ifx_Result->numcols;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
+
+
/* try to fetch the first row */
EXEC SQL FETCH :cursorid USING SQL DESCRIPTOR :descrpid;
switch (ifx_check()) {
***************
*** 2745,2750 ****
--- 2780,2794 ----
descrpid = Ifx_Result->descrpid;
fieldcount = Ifx_Result->numcols;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
+
if (array_init(return_value)==FAILURE) {
RETURN_FALSE;
}
***************
*** 2952,2957 ****
--- 2996,3011 ----
descrpid = Ifx_Result->descrpid;
fieldcount = Ifx_Result->numcols;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
+
+
if (array_init(return_value)==FAILURE) {
RETURN_FALSE;
}
***************
*** 3197,3206 ****
--- 3251,3271 ----
}
}
+ ifx = Ifx_Result->connecid;
cursorid = Ifx_Result->cursorid;
statemid = Ifx_Result->statemid;
descrpid = Ifx_Result->descrpid;
+ EXEC SQL set connection :ifx;
+ if (ifx_check() < 0) {
+ Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
+ php3_error(E_WARNING,"Set connection %s fails (%s)",
+ ifx,
+ ifx_error(ifx));
+ RETURN_FALSE;
+ }
+
+
EXEC SQL free :statemid;
if (strlen(cursorid) != 0) {
EXEC SQL CLOSE :cursorid;
--
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