mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
ported ext/odbc
This commit is contained in:
parent
1899e6f9b9
commit
e8fcd52ef1
4 changed files with 72 additions and 72 deletions
|
@ -291,7 +291,7 @@ PHP_FUNCTION(birdstep_connect)
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
HDBC hdbc;
|
HDBC hdbc;
|
||||||
VConn *new;
|
VConn *new;
|
||||||
long ind;
|
php_int_t ind;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", &serv, &serv_len, &user, &user_len, &pass, &pass_len) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", &serv, &serv_len, &user, &user_len, &pass, &pass_len) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
@ -324,10 +324,10 @@ PHP_FUNCTION(birdstep_connect)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_close)
|
PHP_FUNCTION(birdstep_close)
|
||||||
{
|
{
|
||||||
long id;
|
php_int_t id;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &id) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ PHP_FUNCTION(birdstep_close)
|
||||||
PHP_FUNCTION(birdstep_exec)
|
PHP_FUNCTION(birdstep_exec)
|
||||||
{
|
{
|
||||||
char *query;
|
char *query;
|
||||||
long ind;
|
php_int_t ind;
|
||||||
int query_len, indx;
|
int query_len, indx;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
|
@ -354,7 +354,7 @@ PHP_FUNCTION(birdstep_exec)
|
||||||
SWORD cols,i,colnamelen;
|
SWORD cols,i,colnamelen;
|
||||||
SDWORD rows,coldesc;
|
SDWORD rows,coldesc;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &ind, &query, &query_len) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "is", &ind, &query, &query_len) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,13 +426,13 @@ PHP_FUNCTION(birdstep_exec)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_fetch)
|
PHP_FUNCTION(birdstep_fetch)
|
||||||
{
|
{
|
||||||
long ind;
|
php_int_t ind;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
UDWORD row;
|
UDWORD row;
|
||||||
UWORD RowStat[1];
|
UWORD RowStat[1];
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &ind) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ PHP_FUNCTION(birdstep_fetch)
|
||||||
PHP_FUNCTION(birdstep_result)
|
PHP_FUNCTION(birdstep_result)
|
||||||
{
|
{
|
||||||
zval **col;
|
zval **col;
|
||||||
long ind;
|
php_int_t ind;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
int i,sql_c_type;
|
int i,sql_c_type;
|
||||||
|
@ -469,7 +469,7 @@ PHP_FUNCTION(birdstep_result)
|
||||||
SWORD indx = -1;
|
SWORD indx = -1;
|
||||||
char *field = NULL;
|
char *field = NULL;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lZ", &ind, &col) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iZ", &ind, &col) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,10 +553,10 @@ l1:
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_freeresult)
|
PHP_FUNCTION(birdstep_freeresult)
|
||||||
{
|
{
|
||||||
long ind;
|
php_int_t ind;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &ind) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,11 +572,11 @@ PHP_FUNCTION(birdstep_freeresult)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_autocommit)
|
PHP_FUNCTION(birdstep_autocommit)
|
||||||
{
|
{
|
||||||
long id;
|
php_int_t id;
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &id) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -595,11 +595,11 @@ PHP_FUNCTION(birdstep_autocommit)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_off_autocommit)
|
PHP_FUNCTION(birdstep_off_autocommit)
|
||||||
{
|
{
|
||||||
long id;
|
php_int_t id;
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &id) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,11 +618,11 @@ PHP_FUNCTION(birdstep_off_autocommit)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_commit)
|
PHP_FUNCTION(birdstep_commit)
|
||||||
{
|
{
|
||||||
long id;
|
php_int_t
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &id) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,11 +641,11 @@ PHP_FUNCTION(birdstep_commit)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_rollback)
|
PHP_FUNCTION(birdstep_rollback)
|
||||||
{
|
{
|
||||||
long id;
|
php_int_t id;
|
||||||
RETCODE stat;
|
RETCODE stat;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &id) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,11 +664,11 @@ PHP_FUNCTION(birdstep_rollback)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_fieldname)
|
PHP_FUNCTION(birdstep_fieldname)
|
||||||
{
|
{
|
||||||
long ind, col;
|
php_int_t ind, col;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
SWORD indx;
|
SWORD indx;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &ind, &col) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &ind, &col) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,10 +687,10 @@ PHP_FUNCTION(birdstep_fieldname)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(birdstep_fieldnum)
|
PHP_FUNCTION(birdstep_fieldnum)
|
||||||
{
|
{
|
||||||
long ind;
|
php_int_t ind;
|
||||||
Vresult *res;
|
Vresult *res;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &ind) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,28 +28,28 @@
|
||||||
|
|
||||||
typedef struct VConn {
|
typedef struct VConn {
|
||||||
HDBC hdbc;
|
HDBC hdbc;
|
||||||
long index;
|
php_int_t index;
|
||||||
} VConn;
|
} VConn;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[32];
|
char name[32];
|
||||||
char *value;
|
char *value;
|
||||||
long vallen;
|
php_int_t vallen;
|
||||||
SDWORD valtype;
|
SDWORD valtype;
|
||||||
} VResVal;
|
} VResVal;
|
||||||
|
|
||||||
typedef struct Vresult {
|
typedef struct Vresult {
|
||||||
HSTMT hstmt;
|
HSTMT hstmt;
|
||||||
VConn *conn;
|
VConn *conn;
|
||||||
long index;
|
php_int_t index;
|
||||||
VResVal *values;
|
VResVal *values;
|
||||||
long numcols;
|
php_int_t numcols;
|
||||||
int fetched;
|
int fetched;
|
||||||
} Vresult;
|
} Vresult;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long num_links;
|
php_int_t num_links;
|
||||||
long max_links;
|
php_int_t max_links;
|
||||||
int le_link,le_result;
|
int le_link,le_result;
|
||||||
} birdstep_module;
|
} birdstep_module;
|
||||||
|
|
||||||
|
|
|
@ -841,9 +841,9 @@ PHP_MINFO_FUNCTION(odbc)
|
||||||
|
|
||||||
php_info_print_table_start();
|
php_info_print_table_start();
|
||||||
php_info_print_table_header(2, "ODBC Support", "enabled");
|
php_info_print_table_header(2, "ODBC Support", "enabled");
|
||||||
snprintf(buf, sizeof(buf), "%ld", ODBCG(num_persistent));
|
snprintf(buf, sizeof(buf), "%pd", ODBCG(num_persistent));
|
||||||
php_info_print_table_row(2, "Active Persistent Links", buf);
|
php_info_print_table_row(2, "Active Persistent Links", buf);
|
||||||
snprintf(buf, sizeof(buf), "%ld", ODBCG(num_links));
|
snprintf(buf, sizeof(buf), "%pd", ODBCG(num_links));
|
||||||
php_info_print_table_row(2, "Active Links", buf);
|
php_info_print_table_row(2, "Active Links", buf);
|
||||||
php_info_print_table_row(2, "ODBC library", PHP_ODBC_TYPE);
|
php_info_print_table_row(2, "ODBC library", PHP_ODBC_TYPE);
|
||||||
#ifndef PHP_WIN32
|
#ifndef PHP_WIN32
|
||||||
|
@ -911,9 +911,9 @@ void php_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||||
{
|
{
|
||||||
odbc_result *result;
|
odbc_result *result;
|
||||||
zval *pv_res;
|
zval *pv_res;
|
||||||
long flag;
|
php_int_t flag;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &pv_res, &flag) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &pv_res, &flag) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1061,9 +1061,9 @@ void odbc_column_lengths(INTERNAL_FUNCTION_PARAMETERS, int type)
|
||||||
SQLLEN len;
|
SQLLEN len;
|
||||||
#endif
|
#endif
|
||||||
zval *pv_res;
|
zval *pv_res;
|
||||||
long pv_num;
|
php_int_t pv_num;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &pv_res, &pv_num) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &pv_res, &pv_num) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1518,13 +1518,13 @@ PHP_FUNCTION(odbc_cursor)
|
||||||
PHP_FUNCTION(odbc_data_source)
|
PHP_FUNCTION(odbc_data_source)
|
||||||
{
|
{
|
||||||
zval *zv_conn;
|
zval *zv_conn;
|
||||||
long zv_fetch_type;
|
php_int_t zv_fetch_type;
|
||||||
RETCODE rc = 0; /* assume all is good */
|
RETCODE rc = 0; /* assume all is good */
|
||||||
odbc_connection *conn;
|
odbc_connection *conn;
|
||||||
UCHAR server_name[100], desc[200];
|
UCHAR server_name[100], desc[200];
|
||||||
SQLSMALLINT len1=0, len2=0, fetch_type;
|
SQLSMALLINT len1=0, len2=0, fetch_type;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zv_conn, &zv_fetch_type) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &zv_conn, &zv_fetch_type) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1573,7 +1573,7 @@ PHP_FUNCTION(odbc_data_source)
|
||||||
PHP_FUNCTION(odbc_exec)
|
PHP_FUNCTION(odbc_exec)
|
||||||
{
|
{
|
||||||
zval *pv_conn;
|
zval *pv_conn;
|
||||||
long pv_flags;
|
php_int_t pv_flags;
|
||||||
char *query;
|
char *query;
|
||||||
int numArgs, query_len;
|
int numArgs, query_len;
|
||||||
odbc_result *result = NULL;
|
odbc_result *result = NULL;
|
||||||
|
@ -1585,7 +1585,7 @@ PHP_FUNCTION(odbc_exec)
|
||||||
|
|
||||||
numArgs = ZEND_NUM_ARGS();
|
numArgs = ZEND_NUM_ARGS();
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &pv_conn, &query, &query_len, &pv_flags) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|i", &pv_conn, &query, &query_len, &pv_flags) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1668,9 +1668,9 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||||
SQLUSMALLINT RowStatus[1];
|
SQLUSMALLINT RowStatus[1];
|
||||||
SQLLEN rownum;
|
SQLLEN rownum;
|
||||||
zval *pv_res, tmp;
|
zval *pv_res, tmp;
|
||||||
long pv_row = -1;
|
php_int_t pv_row = -1;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &pv_res, &pv_row) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &pv_res, &pv_row) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1815,14 +1815,14 @@ PHP_FUNCTION(odbc_fetch_into)
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
zval *pv_res, *pv_res_arr, tmp;
|
zval *pv_res, *pv_res_arr, tmp;
|
||||||
#ifdef HAVE_SQL_EXTENDED_FETCH
|
#ifdef HAVE_SQL_EXTENDED_FETCH
|
||||||
long pv_row = 0;
|
php_int_t pv_row = 0;
|
||||||
SQLULEN crow;
|
SQLULEN crow;
|
||||||
SQLUSMALLINT RowStatus[1];
|
SQLUSMALLINT RowStatus[1];
|
||||||
SQLLEN rownum = -1;
|
SQLLEN rownum = -1;
|
||||||
#endif /* HAVE_SQL_EXTENDED_FETCH */
|
#endif /* HAVE_SQL_EXTENDED_FETCH */
|
||||||
|
|
||||||
#ifdef HAVE_SQL_EXTENDED_FETCH
|
#ifdef HAVE_SQL_EXTENDED_FETCH
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz/|l", &pv_res, &pv_res_arr, &pv_row) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz/|i", &pv_res, &pv_res_arr, &pv_row) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1964,13 +1964,13 @@ PHP_FUNCTION(odbc_fetch_row)
|
||||||
odbc_result *result;
|
odbc_result *result;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
zval *pv_res;
|
zval *pv_res;
|
||||||
long pv_row = 1;
|
php_int_t pv_row = 1;
|
||||||
#ifdef HAVE_SQL_EXTENDED_FETCH
|
#ifdef HAVE_SQL_EXTENDED_FETCH
|
||||||
SQLULEN crow;
|
SQLULEN crow;
|
||||||
SQLUSMALLINT RowStatus[1];
|
SQLUSMALLINT RowStatus[1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &pv_res, &pv_row) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &pv_res, &pv_row) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2501,7 +2501,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||||
{
|
{
|
||||||
char *db, *uid, *pwd;
|
char *db, *uid, *pwd;
|
||||||
int db_len, uid_len, pwd_len;
|
int db_len, uid_len, pwd_len;
|
||||||
long pv_opt = SQL_CUR_DEFAULT;
|
php_int_t pv_opt = SQL_CUR_DEFAULT;
|
||||||
odbc_connection *db_conn;
|
odbc_connection *db_conn;
|
||||||
char *hashed_details;
|
char *hashed_details;
|
||||||
int hashed_len, cur_opt;
|
int hashed_len, cur_opt;
|
||||||
|
@ -2509,7 +2509,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||||
/* Now an optional 4th parameter specifying the cursor type
|
/* Now an optional 4th parameter specifying the cursor type
|
||||||
* defaulting to the cursors default
|
* defaulting to the cursors default
|
||||||
*/
|
*/
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|l", &db, &db_len, &uid, &uid_len, &pwd, &pwd_len, &pv_opt) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|i", &db, &db_len, &uid, &uid_len, &pwd, &pwd_len, &pv_opt) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2784,9 +2784,9 @@ PHP_FUNCTION(odbc_field_name)
|
||||||
{
|
{
|
||||||
odbc_result *result;
|
odbc_result *result;
|
||||||
zval *pv_res;
|
zval *pv_res;
|
||||||
long pv_num;
|
php_int_t pv_num;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &pv_res, &pv_num) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &pv_res, &pv_num) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2819,9 +2819,9 @@ PHP_FUNCTION(odbc_field_type)
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
SQLSMALLINT tmplen;
|
SQLSMALLINT tmplen;
|
||||||
zval *pv_res;
|
zval *pv_res;
|
||||||
long pv_num;
|
php_int_t pv_num;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &pv_res, &pv_num) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &pv_res, &pv_num) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2905,9 +2905,9 @@ PHP_FUNCTION(odbc_autocommit)
|
||||||
odbc_connection *conn;
|
odbc_connection *conn;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
zval *pv_conn;
|
zval *pv_conn;
|
||||||
long pv_onoff = 0;
|
php_int_t pv_onoff = 0;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &pv_conn, &pv_onoff) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &pv_conn, &pv_onoff) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3017,9 +3017,9 @@ PHP_FUNCTION(odbc_setoption)
|
||||||
odbc_result *result;
|
odbc_result *result;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
zval *pv_handle;
|
zval *pv_handle;
|
||||||
long pv_which, pv_opt, pv_val;
|
php_int_t pv_which, pv_opt, pv_val;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &pv_handle, &pv_which, &pv_opt, &pv_val) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "riii", &pv_handle, &pv_which, &pv_opt, &pv_val) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3344,13 +3344,13 @@ PHP_FUNCTION(odbc_foreignkeys)
|
||||||
PHP_FUNCTION(odbc_gettypeinfo)
|
PHP_FUNCTION(odbc_gettypeinfo)
|
||||||
{
|
{
|
||||||
zval *pv_conn;
|
zval *pv_conn;
|
||||||
long pv_data_type = SQL_ALL_TYPES;
|
php_int_t pv_data_type = SQL_ALL_TYPES;
|
||||||
odbc_result *result = NULL;
|
odbc_result *result = NULL;
|
||||||
odbc_connection *conn;
|
odbc_connection *conn;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
SQLSMALLINT data_type;
|
SQLSMALLINT data_type;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &pv_conn, &pv_data_type) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &pv_conn, &pv_data_type) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3597,7 +3597,7 @@ PHP_FUNCTION(odbc_procedures)
|
||||||
PHP_FUNCTION(odbc_specialcolumns)
|
PHP_FUNCTION(odbc_specialcolumns)
|
||||||
{
|
{
|
||||||
zval *pv_conn;
|
zval *pv_conn;
|
||||||
long vtype, vscope, vnullable;
|
php_int_t vtype, vscope, vnullable;
|
||||||
odbc_result *result = NULL;
|
odbc_result *result = NULL;
|
||||||
odbc_connection *conn;
|
odbc_connection *conn;
|
||||||
char *cat = NULL, *schema = NULL, *name = NULL;
|
char *cat = NULL, *schema = NULL, *name = NULL;
|
||||||
|
@ -3605,7 +3605,7 @@ PHP_FUNCTION(odbc_specialcolumns)
|
||||||
SQLUSMALLINT type, scope, nullable;
|
SQLUSMALLINT type, scope, nullable;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rls!ssll", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len,
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ris!ssi", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len,
|
||||||
&name, &name_len, &vscope, &vnullable) == FAILURE) {
|
&name, &name_len, &vscope, &vnullable) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3667,7 +3667,7 @@ PHP_FUNCTION(odbc_specialcolumns)
|
||||||
PHP_FUNCTION(odbc_statistics)
|
PHP_FUNCTION(odbc_statistics)
|
||||||
{
|
{
|
||||||
zval *pv_conn;
|
zval *pv_conn;
|
||||||
long vunique, vreserved;
|
php_int_t vunique, vreserved;
|
||||||
odbc_result *result = NULL;
|
odbc_result *result = NULL;
|
||||||
odbc_connection *conn;
|
odbc_connection *conn;
|
||||||
char *cat = NULL, *schema, *name;
|
char *cat = NULL, *schema, *name;
|
||||||
|
@ -3675,7 +3675,7 @@ PHP_FUNCTION(odbc_statistics)
|
||||||
SQLUSMALLINT unique, reserved;
|
SQLUSMALLINT unique, reserved;
|
||||||
RETCODE rc;
|
RETCODE rc;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!ssll", &pv_conn, &cat, &cat_len, &schema, &schema_len,
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!ssii", &pv_conn, &cat, &cat_len, &schema, &schema_len,
|
||||||
&name, &name_len, &vunique, &vreserved) == FAILURE) {
|
&name, &name_len, &vunique, &vreserved) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ PHP_FUNCTION(solid_fetch_prev);
|
||||||
#define ODBC_TYPE "Birdstep"
|
#define ODBC_TYPE "Birdstep"
|
||||||
#define UNIX
|
#define UNIX
|
||||||
/*
|
/*
|
||||||
* Extended Fetch in the Birdstep ODBC API is incapable of returning long varchar (memo) fields.
|
* Extended Fetch in the Birdstep ODBC API is incapable of returning php_int_t varchar (memo) fields.
|
||||||
* So the following line has been commented-out to accommodate. - KNS
|
* So the following line has been commented-out to accommodate. - KNS
|
||||||
*
|
*
|
||||||
* #define HAVE_SQL_EXTENDED_FETCH 1
|
* #define HAVE_SQL_EXTENDED_FETCH 1
|
||||||
|
@ -247,7 +247,7 @@ typedef struct odbc_result {
|
||||||
# if HAVE_SQL_EXTENDED_FETCH
|
# if HAVE_SQL_EXTENDED_FETCH
|
||||||
int fetch_abs;
|
int fetch_abs;
|
||||||
# endif
|
# endif
|
||||||
long longreadlen;
|
php_int_t longreadlen;
|
||||||
int binmode;
|
int binmode;
|
||||||
int fetched;
|
int fetched;
|
||||||
odbc_connection *conn_ptr;
|
odbc_connection *conn_ptr;
|
||||||
|
@ -257,16 +257,16 @@ ZEND_BEGIN_MODULE_GLOBALS(odbc)
|
||||||
char *defDB;
|
char *defDB;
|
||||||
char *defUser;
|
char *defUser;
|
||||||
char *defPW;
|
char *defPW;
|
||||||
long allow_persistent;
|
php_int_t allow_persistent;
|
||||||
long check_persistent;
|
php_int_t check_persistent;
|
||||||
long max_persistent;
|
php_int_t max_persistent;
|
||||||
long max_links;
|
php_int_t max_links;
|
||||||
long num_persistent;
|
php_int_t num_persistent;
|
||||||
long num_links;
|
php_int_t num_links;
|
||||||
int defConn;
|
int defConn;
|
||||||
long defaultlrl;
|
php_int_t defaultlrl;
|
||||||
long defaultbinmode;
|
php_int_t defaultbinmode;
|
||||||
long default_cursortype;
|
php_int_t default_cursortype;
|
||||||
char laststate[6];
|
char laststate[6];
|
||||||
char lasterrormsg[SQL_MAX_MESSAGE_LENGTH];
|
char lasterrormsg[SQL_MAX_MESSAGE_LENGTH];
|
||||||
HashTable *resource_list;
|
HashTable *resource_list;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue