CVS update: php3/functions
| From: | thies | Date: | Mon, 15 Feb 1999 16:32:41 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4102@lists.php.net to get a copy of this message | ||
Date: Monday February 15, 1999 @ 11:32
Author: thies
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv27735
Modified Files:
oci8.c php3_oci8.h
Log Message:
added indicator & retcode to bindbyname. even though we use callbacks oracle NEEDS this to be
able to return NULLs from stored procedures...
Index: php3/functions/oci8.c
diff -c php3/functions/oci8.c:1.46 php3/functions/oci8.c:1.47
*** php3/functions/oci8.c:1.46 Mon Feb 15 06:55:28 1999
--- php3/functions/oci8.c Mon Feb 15 11:32:40 1999
***************
*** 32,38 ****
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.46 1999/02/15 11:55:28 thies Exp $ */
#include "php.h"
#include "internal_functions.h"
--- 32,38 ----
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.47 1999/02/15 16:32:40 thies Exp $ */
#include "php.h"
#include "internal_functions.h"
***************
*** 63,68 ****
--- 63,69 ----
* - split the module into an upper (php-callable) and lower (c-callable) layer!
* - make_pval needs some cleanup....
* - persistend connections
+ * - NULLS (retcode/indicator) needs some more work for describing & binding
*/
/* {{{ thread safety stuff */
***************
*** 1180,1186 ****
*alenpp = (ub4*) &phpbind->value->value.str.len; /* XXX we assume that php-pval len
has 4 bytes */
*bufpp = phpbind->value->value.str.val;
*piecep = OCI_ONE_PIECE;
! *rcodepp = &phpbind->rcode;
*indpp = &phpbind->indicator;
}
--- 1181,1187 ----
*alenpp = (ub4*) &phpbind->value->value.str.len; /* XXX we assume that php-pval len
has 4 bytes */
*bufpp = phpbind->value->value.str.val;
*piecep = OCI_ONE_PIECE;
! *rcodepp = &phpbind->retcode;
*indpp = &phpbind->indicator;
}
***************
*** 1291,1299 ****
(dvoid *)0, /* in/out data */
ocimaxlen, /* max size of input/output data */
(ub2)ocitype, /* in/out data type */
! (dvoid *)0, /* indicator (ignored) */
(ub2 *)0, /* size array (ignored) */
! (ub2 *)0, /* return code (ignored) */
(ub4)0, /* maxarr_len (PL/SQL only?) */
(ub4 *)0, /* actual array size (PL/SQL only?) */
OCI_DATA_AT_EXEC /* mode */);
--- 1292,1300 ----
(dvoid *)0, /* in/out data */
ocimaxlen, /* max size of input/output data */
(ub2)ocitype, /* in/out data type */
! (dvoid *)&bind->indicator, /* indicator (ignored) */
(ub2 *)0, /* size array (ignored) */
! (ub2 *)&bind->retcode, /* return code (ignored) */
(ub4)0, /* maxarr_len (PL/SQL only?) */
(ub4 *)0, /* actual array size (PL/SQL only?) */
OCI_DATA_AT_EXEC /* mode */);
***************
*** 1847,1856 ****
if (statement == NULL) {
RETURN_FALSE;
}
if (array->type != IS_ARRAY) {
if (array_init(array) == FAILURE) {
! php3_error(E_WARNING,
! "OCIFetchInto: unable to convert arg 2 to array");
RETURN_FALSE;
}
}
--- 1848,1857 ----
if (statement == NULL) {
RETURN_FALSE;
}
+
if (array->type != IS_ARRAY) {
if (array_init(array) == FAILURE) {
! php3_error(E_WARNING, "OCIFetchInto: unable to convert arg 2 to array");
RETURN_FALSE;
}
}
***************
*** 1864,1871 ****
continue;
}
! if ((column->indicator == -1)
! && ((mode & OCI_RETURN_NULLS) == 0)) {
continue;
}
--- 1865,1871 ----
continue;
}
! if ((column->indicator == -1) && ((mode & OCI_RETURN_NULLS) == 0)) {
continue;
}
***************
*** 1882,1887 ****
--- 1882,1888 ----
_php3_hash_update(array->value.ht, namebuf, column->name_len+1, (void *)&element,
sizeof(pval), NULL);
}
}
+
RETVAL_LONG(statement->ncolumns);
}
Index: php3/functions/php3_oci8.h
diff -c php3/functions/php3_oci8.h:1.24 php3/functions/php3_oci8.h:1.25
*** php3/functions/php3_oci8.h:1.24 Mon Feb 15 05:39:32 1999
--- php3/functions/php3_oci8.h Mon Feb 15 11:32:41 1999
***************
*** 92,98 ****
dvoid *descr; /* used for binding of LOBS etc */
ub4 maxsize;
sb2 indicator;
! ub2 rcode;
} oci8_bind;
typedef struct {
--- 92,98 ----
dvoid *descr; /* used for binding of LOBS etc */
ub4 maxsize;
sb2 indicator;
! ub2 retcode;
} oci8_bind;
typedef struct {
--
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