/* {{{ thread safety stuff */
#if defined(THREAD_SAFE)
typedef ibase_global_struct{
- ibase_module php3_ibase_module;
+ ibase_module php_ibase_module;
} ibase_global_struct;
#define IBASE_GLOBAL(a) ibase_globals->a
#else
#define IBASE_GLOBAL(a) a
#define IBASE_TLS_VARS
-ibase_module php3_ibase_module;
+ibase_module php_ibase_module;
#endif
/* }}} */
-/* {{{ _php3_ibase_close_link() */
-static void _php3_ibase_close_link(isc_db_handle db)
+/* {{{ php_ibase_close_link() */
+static void php_ibase_close_link(isc_db_handle db)
{
ISC_STATUS status[20];
IBASE_TLS_VARS;
isc_detach_database(status, &db);
- IBASE_GLOBAL(php3_ibase_module).num_links--;
+ IBASE_GLOBAL(php_ibase_module).num_links--;
}
/* }}} */
-/* {{{ _php3_ibase_close_plink() */
-static void _php3_ibase_close_plink(isc_db_handle db)
+/* {{{ php_ibase_close_plink() */
+static void php_ibase_close_plink(isc_db_handle db)
{
ISC_STATUS status[20];
IBASE_TLS_VARS;
isc_detach_database(status, &db);
- php3_ibase_module.num_persistent--;
- php3_ibase_module.num_links--;
+ php_ibase_module.num_persistent--;
+ php_ibase_module.num_links--;
}
/* }}} */
-/* {{{ _php3_ibase_free_result() */
-static void _php3_ibase_free_result(ibase_result_handle *result)
+/* {{{ php_ibase_free_result() */
+static void php_ibase_free_result(ibase_result_handle *result)
{
int i;
ISC_STATUS status[20];
IBASE_TLS_VARS;
- if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions && result->commitok) {
+ if (!IBASE_GLOBAL(php_ibase_module).manualtransactions && result->commitok) {
isc_commit_transaction(status, &result->trans);
}
if (result->sqlda != NULL) {
}
/* }}} */
-/* {{{ _php3_ibase_free_query() */
-static void _php3_ibase_free_query(ibase_query_handle *query)
+/* {{{ php_ibase_free_query() */
+static void php_ibase_free_query(ibase_query_handle *query)
{
int i;
ISC_STATUS status[20];
{
IBASE_TLS_VARS;
- if (cfg_get_long("ibase.allow_persistent", &IBASE_GLOBAL(php3_ibase_module).allow_persistent) == FAILURE) {
- IBASE_GLOBAL(php3_ibase_module).allow_persistent = 1;
+ if (cfg_get_long("ibase.allow_persistent", &IBASE_GLOBAL(php_ibase_module).allow_persistent) == FAILURE) {
+ IBASE_GLOBAL(php_ibase_module).allow_persistent = 1;
}
- if (cfg_get_long("ibase.max_persistent", &IBASE_GLOBAL(php3_ibase_module).max_persistent) == FAILURE) {
- IBASE_GLOBAL(php3_ibase_module).max_persistent = -1;
+ if (cfg_get_long("ibase.max_persistent", &IBASE_GLOBAL(php_ibase_module).max_persistent) == FAILURE) {
+ IBASE_GLOBAL(php_ibase_module).max_persistent = -1;
}
- if (cfg_get_long("ibase.max_links", &IBASE_GLOBAL(php3_ibase_module).max_links) == FAILURE) {
- IBASE_GLOBAL(php3_ibase_module).max_links = -1;
+ if (cfg_get_long("ibase.max_links", &IBASE_GLOBAL(php_ibase_module).max_links) == FAILURE) {
+ IBASE_GLOBAL(php_ibase_module).max_links = -1;
}
/*
- if (cfg_get_long("ibase.manualtransactions", &IBASE_GLOBAL(php3_ibase_module).manualtransactions) == FAILURE) {
- IBASE_GLOBAL(php3_ibase_module).manualtransactions = 0;
+ if (cfg_get_long("ibase.manualtransactions", &IBASE_GLOBAL(php_ibase_module).manualtransactions) == FAILURE) {
+ IBASE_GLOBAL(php_ibase_module).manualtransactions = 0;
}
*/
- IBASE_GLOBAL(php3_ibase_module).manualtransactions = 0;
- if (cfg_get_string("ibase.default_user", &IBASE_GLOBAL(php3_ibase_module).default_user) == FAILURE
- || IBASE_GLOBAL(php3_ibase_module).default_user[0] == 0) {
- IBASE_GLOBAL(php3_ibase_module).default_user = "";
+ IBASE_GLOBAL(php_ibase_module).manualtransactions = 0;
+ if (cfg_get_string("ibase.default_user", &IBASE_GLOBAL(php_ibase_module).default_user) == FAILURE
+ || IBASE_GLOBAL(php_ibase_module).default_user[0] == 0) {
+ IBASE_GLOBAL(php_ibase_module).default_user = "";
}
- if (cfg_get_string("ibase.default_password", &IBASE_GLOBAL(php3_ibase_module).default_password) == FAILURE
- || IBASE_GLOBAL(php3_ibase_module).default_password[0] == 0) {
- IBASE_GLOBAL(php3_ibase_module).default_password = "";
+ if (cfg_get_string("ibase.default_password", &IBASE_GLOBAL(php_ibase_module).default_password) == FAILURE
+ || IBASE_GLOBAL(php_ibase_module).default_password[0] == 0) {
+ IBASE_GLOBAL(php_ibase_module).default_password = "";
}
- if (cfg_get_string("ibase.timeformat", &IBASE_GLOBAL(php3_ibase_module).timeformat) == FAILURE) {
- IBASE_GLOBAL(php3_ibase_module).timeformat = "%Y-%m-%d %H:%M:%S";
+ if (cfg_get_string("ibase.timeformat", &IBASE_GLOBAL(php_ibase_module).timeformat) == FAILURE) {
+ IBASE_GLOBAL(php_ibase_module).timeformat = "%Y-%m-%d %H:%M:%S";
}
- IBASE_GLOBAL(php3_ibase_module).num_persistent=0;
- IBASE_GLOBAL(php3_ibase_module).le_result = register_list_destructors(_php3_ibase_free_result, NULL);
- IBASE_GLOBAL(php3_ibase_module).le_query = register_list_destructors(_php3_ibase_free_query, NULL);
- IBASE_GLOBAL(php3_ibase_module).le_link = register_list_destructors(_php3_ibase_close_link, NULL);
- IBASE_GLOBAL(php3_ibase_module).le_plink = register_list_destructors(NULL, _php3_ibase_close_plink);
+ IBASE_GLOBAL(php_ibase_module).num_persistent=0;
+ IBASE_GLOBAL(php_ibase_module).le_result = register_list_destructors(php_ibase_free_result, NULL);
+ IBASE_GLOBAL(php_ibase_module).le_query = register_list_destructors(php_ibase_free_query, NULL);
+ IBASE_GLOBAL(php_ibase_module).le_link = register_list_destructors(php_ibase_close_link, NULL);
+ IBASE_GLOBAL(php_ibase_module).le_plink = register_list_destructors(NULL, php_ibase_close_plink);
return SUCCESS;
}
{
IBASE_TLS_VARS;
- IBASE_GLOBAL(php3_ibase_module).default_link=-1;
- IBASE_GLOBAL(php3_ibase_module).num_links = php3_ibase_module.num_persistent;
+ IBASE_GLOBAL(php_ibase_module).default_link=-1;
+ IBASE_GLOBAL(php_ibase_module).num_links = php_ibase_module.num_persistent;
return SUCCESS;
}
/* TODO IF NEEDED
-int php3_mfinish_ibase(void)
+int php_mfinish_ibase(void)
{
}
-int php3_rfinish_ibase(void)
+int php_rfinish_ibase(void)
{
}
*/
}
/* }}} */
-/* {{{ _php3_ibase_connect() */
-static void _php3_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
+/* {{{ php_ibase_connect() */
+static void php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
pval *server, *uname, *passwd;
int hashed_details_length;
IBASE_TLS_VARS;
- ib_uname = IBASE_GLOBAL(php3_ibase_module).default_user;
- ib_passwd = IBASE_GLOBAL(php3_ibase_module).default_password;
+ ib_uname = IBASE_GLOBAL(php_ibase_module).default_user;
+ ib_passwd = IBASE_GLOBAL(php_ibase_module).default_password;
ib_uname_len = ib_uname ? strlen(ib_uname) : 0;
ib_passwd_len = ib_passwd ? strlen(ib_passwd) : 0;
if (zend_hash_find(plist, hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) {
list_entry new_le;
- if (IBASE_GLOBAL(php3_ibase_module).max_links!=-1 && IBASE_GLOBAL(php3_ibase_module).num_links>=IBASE_GLOBAL(php3_ibase_module).max_links) {
- php_error(E_WARNING,"InterBase: Too many open links (%d)", IBASE_GLOBAL(php3_ibase_module).num_links);
+ if (IBASE_GLOBAL(php_ibase_module).max_links!=-1 && IBASE_GLOBAL(php_ibase_module).num_links>=IBASE_GLOBAL(php_ibase_module).max_links) {
+ php_error(E_WARNING,"InterBase: Too many open links (%d)", IBASE_GLOBAL(php_ibase_module).num_links);
efree(hashed_details);
RETURN_FALSE;
}
- if (IBASE_GLOBAL(php3_ibase_module).max_persistent!=-1 && IBASE_GLOBAL(php3_ibase_module).num_persistent>=IBASE_GLOBAL(php3_ibase_module).max_persistent) {
- php_error(E_WARNING,"InterBase: Too many open persistent links (%d)", IBASE_GLOBAL(php3_ibase_module).num_persistent);
+ if (IBASE_GLOBAL(php_ibase_module).max_persistent!=-1 && IBASE_GLOBAL(php_ibase_module).num_persistent>=IBASE_GLOBAL(php_ibase_module).max_persistent) {
+ php_error(E_WARNING,"InterBase: Too many open persistent links (%d)", IBASE_GLOBAL(php_ibase_module).num_persistent);
efree(hashed_details);
RETURN_FALSE;
}
}
/* hash it up */
- new_le.type = php3_ibase_module.le_plink;
+ new_le.type = php_ibase_module.le_plink;
new_le.ptr = db_handle;
if (zend_hash_update(plist, hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
}
- IBASE_GLOBAL(php3_ibase_module).num_links++;
- IBASE_GLOBAL(php3_ibase_module).num_persistent++;
+ IBASE_GLOBAL(php_ibase_module).num_links++;
+ IBASE_GLOBAL(php_ibase_module).num_persistent++;
} else {
- if (le->type != IBASE_GLOBAL(php3_ibase_module).le_plink) {
+ if (le->type != IBASE_GLOBAL(php_ibase_module).le_plink) {
RETURN_FALSE;
}
/* TODO: ensure that the link did not die */
db_handle = (isc_db_handle) le->ptr;
}
- return_value->value.lval = zend_list_insert(db_handle, IBASE_GLOBAL(php3_ibase_module).le_plink);
+ return_value->value.lval = zend_list_insert(db_handle, IBASE_GLOBAL(php_ibase_module).le_plink);
return_value->type = IS_LONG;
} else {
list_entry *index_ptr, new_index_ptr;
}
link = (int) index_ptr->ptr;
ptr = zend_list_find(link,&type); /* check if the link is still there */
- if (ptr && (type==IBASE_GLOBAL(php3_ibase_module).le_link || type==IBASE_GLOBAL(php3_ibase_module).le_plink)) {
- return_value->value.lval = IBASE_GLOBAL(php3_ibase_module).default_link = link;
+ if (ptr && (type==IBASE_GLOBAL(php_ibase_module).le_link || type==IBASE_GLOBAL(php_ibase_module).le_plink)) {
+ return_value->value.lval = IBASE_GLOBAL(php_ibase_module).default_link = link;
return_value->type = IS_LONG;
efree(hashed_details);
return;
zend_hash_del(list,hashed_details,hashed_details_length+1);
}
}
- if (IBASE_GLOBAL(php3_ibase_module).max_links!=-1 && IBASE_GLOBAL(php3_ibase_module).num_links>=IBASE_GLOBAL(php3_ibase_module).max_links) {
- php_error(E_WARNING,"InterBase: Too many open links (%d)", IBASE_GLOBAL(php3_ibase_module).num_links);
+ if (IBASE_GLOBAL(php_ibase_module).max_links!=-1 && IBASE_GLOBAL(php_ibase_module).num_links>=IBASE_GLOBAL(php_ibase_module).max_links) {
+ php_error(E_WARNING,"InterBase: Too many open links (%d)", IBASE_GLOBAL(php_ibase_module).num_links);
efree(hashed_details);
RETURN_FALSE;
}
}
/* add it to the list */
- return_value->value.lval = zend_list_insert(db_handle, IBASE_GLOBAL(php3_ibase_module).le_link);
+ return_value->value.lval = zend_list_insert(db_handle, IBASE_GLOBAL(php_ibase_module).le_link);
return_value->type = IS_LONG;
/* add it to the hash */
efree(hashed_details);
RETURN_FALSE;
}
- IBASE_GLOBAL(php3_ibase_module).num_links++;
+ IBASE_GLOBAL(php_ibase_module).num_links++;
}
efree(hashed_details);
- IBASE_GLOBAL(php3_ibase_module).default_link=return_value->value.lval;
+ IBASE_GLOBAL(php_ibase_module).default_link=return_value->value.lval;
}
/* }}} */
Open a connection to an InterBase database */
PHP_FUNCTION(ibase_connect)
{
- _php3_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+ php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */
Open a persistent connection to an InterBase database */
PHP_FUNCTION(ibase_pconnect)
{
- _php3_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+ php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* }}} */
switch (ARG_COUNT(ht)) {
case 0:
- id = IBASE_GLOBAL(php3_ibase_module).default_link;
+ id = IBASE_GLOBAL(php_ibase_module).default_link;
break;
case 1:
if (getParameters(ht, 1, &ibase_link) == FAILURE) {
}
db_handle = (isc_db_handle) zend_list_find(id, &type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_link && type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_link && type!=IBASE_GLOBAL(php_ibase_module).le_plink) {
php_error(E_WARNING, "%d is not an InterBase link index",id);
RETURN_FALSE;
}
}
/* }}} */
-/* {{{ _php3_ibase_prepare() */
-static XSQLDA *_php3_ibase_prepare(isc_db_handle db, isc_tr_handle tr, isc_stmt_handle *query_handle, char *query)
+/* {{{ php_ibase_prepare() */
+static XSQLDA *php_ibase_prepare(isc_db_handle db, isc_tr_handle tr, isc_stmt_handle *query_handle, char *query)
{
ISC_STATUS status[20];
XSQLDA *isqlda;
}
/* }}} */
-/* {{{ _php3_ibase_execute() */
-static XSQLDA *_php3_ibase_execute(isc_tr_handle tr_handle, isc_stmt_handle query_handle, XSQLDA *isqlda, ISC_STATUS *status)
+/* {{{ php_ibase_execute() */
+static XSQLDA *php_ibase_execute(isc_tr_handle tr_handle, isc_stmt_handle query_handle, XSQLDA *isqlda, ISC_STATUS *status)
{
int i, coltype;
static char query_info[] = { isc_info_sql_stmt_type };
php_error(E_WARNING, "InterBase: couldn't execute query");
}
/*
- if (!php3_ibase_module.manualtransactions) {
+ if (!php_ibase_module.manualtransactions) {
if(0) {
isc_commit_transaction(status, tr_handle);
} else {
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
- id = IBASE_GLOBAL(php3_ibase_module).default_link;
+ id = IBASE_GLOBAL(php_ibase_module).default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
}
db_handle = (isc_db_handle) zend_list_find(id, &type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_link && type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_link && type!=IBASE_GLOBAL(php_ibase_module).le_plink) {
php_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
- if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
+ if (!IBASE_GLOBAL(php_ibase_module).manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
}
}
- isqlda = _php3_ibase_prepare(db_handle, tr_handle, &query_handle, query->value.str.val);
+ isqlda = php_ibase_prepare(db_handle, tr_handle, &query_handle, query->value.str.val);
if (isqlda != NULL) {
isc_rollback_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
}
- osqlda = _php3_ibase_execute(tr_handle, query_handle, isqlda, status);
+ osqlda = php_ibase_execute(tr_handle, query_handle, isqlda, status);
if (osqlda != NULL) {
ibase_result = (ibase_result_handle *) emalloc(sizeof(ibase_result_handle));
ibase_result->result = query_handle;
ibase_result->sqlda = osqlda;
ibase_result->trans = tr_handle;
ibase_result->commitok = 1;
- return_value->value.lval = zend_list_insert(ibase_result, php3_ibase_module.le_result);
+ return_value->value.lval = zend_list_insert(ibase_result, php_ibase_module.le_result);
return_value->type = IS_LONG;
} else {
if (status[0] == 1 && status[1]) {
- if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
+ if (!IBASE_GLOBAL(php_ibase_module).manualtransactions) {
isc_rollback_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
}
} else {
- if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
+ if (!IBASE_GLOBAL(php_ibase_module).manualtransactions) {
isc_commit_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
convert_to_long(result);
ibase_result = (ibase_result_handle *) zend_list_find(result->value.lval, &type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_result) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_result) {
php_error(E_WARNING,"%d is not an InterBase result index", result->value.lval);
RETURN_FALSE;
}
isc_decode_date((ISC_QUAD *) var[i].sqldata, t);
/*
#if HAVE_STRFTIME
- collen = (int) strftime(string_data, 255, IBASE_GLOBAL(php3_ibase_module).timeformat, t);
+ collen = (int) strftime(string_data, 255, IBASE_GLOBAL(php_ibase_module).timeformat, t);
#else
*/
collen = sprintf(string_data, "%4d-%02d-%02d %02d:%02d:%02d", t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
ibase_result = (ibase_result_handle *) zend_list_find(result->value.lval,&type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_result) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_result) {
php_error(E_WARNING,"%d is not an InterBase result index",result->value.lval);
RETURN_FALSE;
}
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
- id = IBASE_GLOBAL(php3_ibase_module).default_link;
+ id = IBASE_GLOBAL(php_ibase_module).default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
}
db_handle = (isc_db_handle) zend_list_find(id, &type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_link && type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_link && type!=IBASE_GLOBAL(php_ibase_module).le_plink) {
php_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
- if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
+ if (!IBASE_GLOBAL(php_ibase_module).manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
}
}
- isqlda = _php3_ibase_prepare(db_handle, tr_handle, &query_handle, query->value.str.val);
+ isqlda = php_ibase_prepare(db_handle, tr_handle, &query_handle, query->value.str.val);
ibase_query = (ibase_query_handle *) emalloc(sizeof(ibase_query_handle));
ibase_query->query = query_handle;
ibase_query->sqlda = isqlda;
ibase_query->trans = tr_handle;
ibase_query->alloced = 0;
- return_value->value.lval = zend_list_insert(ibase_query, php3_ibase_module.le_query);
+ return_value->value.lval = zend_list_insert(ibase_query, php_ibase_module.le_query);
return_value->type = IS_LONG;
}
/* }}} */
ibase_query = (ibase_query_handle *) zend_list_find(query->value.lval,&type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_query) {
php_error(E_WARNING,"%d is not an InterBase query index",query->value.lval);
RETURN_FALSE;
}
ibase_query = (ibase_query_handle *) zend_list_find(query->value.lval,&type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_query) {
php_error(E_WARNING,"%d is not an InterBase query index", query->value.lval);
RETURN_FALSE;
}
- osqlda = _php3_ibase_execute(ibase_query->trans, ibase_query->query, ibase_query->sqlda, status);
+ osqlda = php_ibase_execute(ibase_query->trans, ibase_query->query, ibase_query->sqlda, status);
ibase_result = (ibase_result_handle *) emalloc(sizeof(ibase_result_handle));
ibase_result->result = ibase_query->query;
ibase_result->sqlda = osqlda;
- return_value->value.lval = zend_list_insert(ibase_result, IBASE_GLOBAL(php3_ibase_module).le_result);
+ return_value->value.lval = zend_list_insert(ibase_result, IBASE_GLOBAL(php_ibase_module).le_result);
return_value->type = IS_LONG;
}
/* }}} */
ibase_query = (ibase_query_handle *) zend_list_find(query->value.lval, &type);
- if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
+ if (type!=IBASE_GLOBAL(php_ibase_module).le_query) {
php_error(E_WARNING,"%d is not an InterBase query index", query->value.lval);
RETURN_FALSE;
}
} while ( SQL_SUCCEEDED( ret ));
}
-void php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
+void php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
odbc_result *result;
pval **pv_res, **pv_flag;
Handle binary column data */
PHP_FUNCTION(odbc_binmode)
{
- php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
+ php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* }}} */
Handle LONG columns */
PHP_FUNCTION(odbc_longreadlen)
{
- php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
+ php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* }}} */
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_prepare");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_prepare");
RETURN_FALSE;
}
result->stmt, state, &error, errormsg,
sizeof(errormsg)-1, &errormsgsize);
if (!strncmp(state,"S1015",5)) {
- sprintf(cursorname,"php3_curs_%d", (int)result->stmt);
+ sprintf(cursorname,"php_curs_%d", (int)result->stmt);
if (SQLSetCursorName(result->stmt,cursorname,SQL_NTS) != SQL_SUCCESS) {
ODBC_SQL_ERROR(result->conn_ptr->henv, result->conn_ptr->hdbc,
result->stmt, "SQLSetCursorName");
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_tables");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_tables");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_columns");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_columns");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_columnprivileges");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_columnprivileges");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_foreignkeys");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_foreignkeys");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_gettypeinfo");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_gettypeinfo");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_primarykeys");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_primarykeys");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_procedurecolumns");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_procedurecolumns");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_procedures");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_procedures");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_specialcolumns");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_specialcolumns");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_statistics");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_statistics");
RETURN_FALSE;
}
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
efree(result);
- php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_tableprivileges");
+ php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_tableprivileges");
RETURN_FALSE;
}