CVS update: php3/dl/mssql
| From: | fmk | Date: | Mon, 21 Sep 1998 09:13:13 +0000 |
| Subject: | CVS update: php3/dl/mssql | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1317@lists.php.net to get a copy of this message | ||
Date: Monday September 21, 1998 @ 5:13
Author: fmk
Update of /repository/php3/dl/mssql
In directory asf:/u2/tmp/cvs-serv19881
Modified Files:
mssql.c
Log Message:
Microsofts DB library retruns SQLCHAR for both CHAR and VARCHAR columns.
Therefor SQLVARCHAR is no longer returned by mssel_fieldtype().
Futhermoder 'numeric' is returned for SQLNUMERIC cols.
Index: php3/dl/mssql/mssql.c
diff -c php3/dl/mssql/mssql.c:1.8 php3/dl/mssql/mssql.c:1.9
*** php3/dl/mssql/mssql.c:1.8 Thu Sep 17 12:42:23 1998
--- php3/dl/mssql/mssql.c Mon Sep 21 05:13:12 1998
***************
*** 59,65 ****
#if PHP_31
#include "ext/standard/php3_string.h"
#else
! #include "php3_string.h"
#endif
#include "php3_list.h"
--- 59,65 ----
#if PHP_31
#include "ext/standard/php3_string.h"
#else
! #include "functions/php3_string.h"
#endif
#include "php3_list.h"
***************
*** 217,223 ****
int php3_minit_mssql(INIT_FUNC_ARGS)
{
! char *interface_file;
long compatability_mode,connecttimeout;
#if defined(THREAD_SAFE)
mssql_module *php3_mssql_module;
--- 217,223 ----
int php3_minit_mssql(INIT_FUNC_ARGS)
{
! // char *interface_file;
long compatability_mode,connecttimeout;
#if defined(THREAD_SAFE)
mssql_module *php3_mssql_module;
***************
*** 244,252 ****
dberrhandle((DBERRHANDLE_PROC) php3_mssql_error_handler);
dbmsghandle((DBMSGHANDLE_PROC) php3_mssql_message_handler);
! if (cfg_get_string("mssql.interface_file",&interface_file)==SUCCESS) {
//dbsetifile(interface_file);
! }
if
(cfg_get_long("mssql.allow_persistent",&msSQL_GLOBAL(allow_persistent))==FAILURE) {
msSQL_GLOBAL(allow_persistent)=1;
}
--- 244,252 ----
dberrhandle((DBERRHANDLE_PROC) php3_mssql_error_handler);
dbmsghandle((DBMSGHANDLE_PROC) php3_mssql_message_handler);
! //if (cfg_get_string("mssql.interface_file",&interface_file)==SUCCESS) {
//dbsetifile(interface_file);
! //}
if
(cfg_get_long("mssql.allow_persistent",&msSQL_GLOBAL(allow_persistent))==FAILURE) {
msSQL_GLOBAL(allow_persistent)=1;
}
***************
*** 690,703 ****
switch (column_type)
{
case SQLINT2:
! case SQLINT4:
case SQLNUMERIC: {
result->value.lval = (long) anyintcol(offset);
result->type = IS_LONG;
break;
}
case SQLCHAR:
case SQLTEXT: {
int length;
char *data = charcol(offset);
--- 690,706 ----
switch (column_type)
{
+ case SQLINT1:
case SQLINT2:
! case SQLINT4:
! case SQLINTN:
case SQLNUMERIC: {
result->value.lval = (long) anyintcol(offset);
result->type = IS_LONG;
break;
}
case SQLCHAR:
+ case SQLVARCHAR:
case SQLTEXT: {
int length;
char *data = charcol(offset);
***************
*** 895,900 ****
--- 898,904 ----
result->fields[i].type = column_types[i];
/* set numeric flag */
switch (column_types[i]) {
+ case SQLINT1:
case SQLINT2:
case SQLINT4:
case SQLFLT8:
***************
*** 903,908 ****
--- 907,913 ----
result->fields[i].numeric = 1;
break;
case SQLCHAR:
+ case SQLVARCHAR:
case SQLTEXT:
default:
result->fields[i].numeric = 0;
***************
*** 1126,1132 ****
RETURN_TRUE;
}
-
static char *php3_mssql_get_field_name(int type)
{
switch (type) {
--- 1131,1136 ----
***************
*** 1135,1144 ****
return "blob";
break;
case SQLCHAR:
- return "char";
- break;
case SQLVARCHAR:
! return "varchar";
break;
case SQLTEXT:
return "text";
--- 1139,1146 ----
return "blob";
break;
case SQLCHAR:
case SQLVARCHAR:
! return "char";
break;
case SQLTEXT:
return "text";
***************
*** 1157,1164 ****
case SQLINT2:
case SQLINT4:
case SQLINTN:
- case SQLNUMERIC:
return "int";
break;
case SQLMONEY:
case SQLMONEY4:
--- 1159,1168 ----
case SQLINT2:
case SQLINT4:
case SQLINTN:
return "int";
+ break;
+ case SQLNUMERIC:
+ return "numeric";
break;
case SQLMONEY:
case SQLMONEY4:
--
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