CVS update: php3/functions
| From: | danny | Date: | Tue, 22 Sep 1998 17:09:00 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1409@lists.php.net to get a copy of this message | ||
Date: Tuesday September 22, 1998 @ 13:09
Author: danny
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv14385/functions
Modified Files:
ifx.ec
Log Message:
Now BLOB "update" queries also work ("insert" and "select" was OK).
Tested on ODS 7.23.
Index: php3/functions/ifx.ec
diff -c php3/functions/ifx.ec:1.27 php3/functions/ifx.ec:1.28
*** php3/functions/ifx.ec:1.27 Sun Sep 20 15:07:30 1998
--- php3/functions/ifx.ec Tue Sep 22 13:08:58 1998
***************
*** 129,136 ****
EXEC SQL include locator;
EXEC SQL include sqltypes;
-
#include <errno.h>
typedef char IFX[128];
--- 129,136 ----
EXEC SQL include locator;
EXEC SQL include sqltypes;
+ EXEC SQL include sqlstype;
#include <errno.h>
typedef char IFX[128];
***************
*** 913,919 ****
int locind;
int ctype;
int affected_rows;
!
Informix_TLS_VARS;
if(ARG_COUNT(ht)<2) {
--- 913,920 ----
int locind;
int ctype;
int affected_rows;
! int query_type;
!
Informix_TLS_VARS;
if(ARG_COUNT(ht)<2) {
***************
*** 984,989 ****
--- 985,992 ----
RETURN_FALSE;
}
+ query_type = sqlca.sqlcode;
+
Ifx_Result = (IFX_RES *)emalloc(sizeof(IFX_RES));
if (Ifx_Result == NULL) {
php3_error(E_WARNING,"Out of memory allocating IFX_RES");
***************
*** 1007,1013 ****
Ifx_Result->iscursory = -1; /* prevent ifx_do */
Ifx_Result->paramquery=0;
! if (sqlca.sqlcode != 0) { /* not a select, execute immediate */
/* ##
## NONSELECT-STATEMENT
##
--- 1010,1016 ----
Ifx_Result->iscursory = -1; /* prevent ifx_do */
Ifx_Result->paramquery=0;
! if (query_type != 0) { /* not a select, execute immediate */
/* ##
## NONSELECT-STATEMENT
##
***************
*** 1051,1056 ****
--- 1054,1062 ----
if(locator->loc_loctype==LOCFNAME) {
locator->loc_oflags=LOC_RONLY;
}
+ if ((query_type == SQ_UPDATE) || (query_type == SQ_UPDALL)) {
+ EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
+ }
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i
DATA= :*locator,
TYPE= :loc_t_type;
***************
*** 1236,1241 ****
--- 1242,1248 ----
int locind;
int ctype;
int affected_rows;
+ int query_type;
Informix_TLS_VARS;
***************
*** 1308,1313 ****
--- 1315,1322 ----
RETURN_FALSE;
}
+ query_type = sqlca.sqlcode;
+
Ifx_Result = (IFX_RES *)emalloc(sizeof(IFX_RES));
if (Ifx_Result == NULL) {
Informix_GLOBAL(php3_ifx_module).sv_sqlcode = SQLCODE;
***************
*** 1333,1339 ****
Ifx_Result->iscursory = -1; /* prevent ifx_do */
Ifx_Result->paramquery=0;
! if (sqlca.sqlcode != 0) { /* not a select, execute immediate */
/* ##
## NONSELECT-STATEMENT
##
--- 1342,1348 ----
Ifx_Result->iscursory = -1; /* prevent ifx_do */
Ifx_Result->paramquery=0;
! if (query_type != 0) { /* not a select, execute immediate */
/* ##
## NONSELECT-STATEMENT
##
***************
*** 1376,1381 ****
--- 1385,1393 ----
}
if(locator->loc_loctype==LOCFNAME) {
locator->loc_oflags=LOC_RONLY;
+ }
+ if ((query_type == SQ_UPDATE) || (query_type == SQ_UPDALL)) {
+ EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
}
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i
DATA= :*locator,
--
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