mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
- Use the same coding standards for pointers as the rest of PHP.
- For example, char ** foo should be char **foo
This commit is contained in:
parent
9a22911392
commit
e245e33f1f
16 changed files with 214 additions and 214 deletions
|
@ -78,7 +78,7 @@ int get_module_identifier(char * module_name) {
|
||||||
return DBX_UNKNOWN;
|
return DBX_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
int split_dbx_handle_object(zval ** dbx_object, zval *** pdbx_handle, zval *** pdbx_module, zval *** pdbx_database) {
|
int split_dbx_handle_object(zval **dbx_object, zval *** pdbx_handle, zval *** pdbx_module, zval *** pdbx_database) {
|
||||||
convert_to_object_ex(dbx_object);
|
convert_to_object_ex(dbx_object);
|
||||||
if (zend_hash_find(Z_OBJPROP_PP(dbx_object), "handle", 7, (void **) pdbx_handle)==FAILURE
|
if (zend_hash_find(Z_OBJPROP_PP(dbx_object), "handle", 7, (void **) pdbx_handle)==FAILURE
|
||||||
|| zend_hash_find(Z_OBJPROP_PP(dbx_object), "module", 7, (void **) pdbx_module)==FAILURE
|
|| zend_hash_find(Z_OBJPROP_PP(dbx_object), "module", 7, (void **) pdbx_module)==FAILURE
|
||||||
|
@ -89,7 +89,7 @@ int split_dbx_handle_object(zval ** dbx_object, zval *** pdbx_handle, zval *** p
|
||||||
}
|
}
|
||||||
|
|
||||||
/* from dbx.h, to be used in support-files (dbx_mysql.c etc...) */
|
/* from dbx.h, to be used in support-files (dbx_mysql.c etc...) */
|
||||||
void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval ** returnvalue, int number_of_arguments, zval ***params)
|
void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval **returnvalue, int number_of_arguments, zval ***params)
|
||||||
{
|
{
|
||||||
zval * zval_function_name;
|
zval * zval_function_name;
|
||||||
|
|
||||||
|
@ -110,23 +110,23 @@ void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, z
|
||||||
* do NOT use the return_value parameter from INTERNAL_FUNCTION_PARAMETERS
|
* do NOT use the return_value parameter from INTERNAL_FUNCTION_PARAMETERS
|
||||||
* you can additionally return 0 or 1 for failure or success which will also be returned by the switches
|
* you can additionally return 0 or 1 for failure or success which will also be returned by the switches
|
||||||
*/
|
*/
|
||||||
int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int switch_dbx_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int switch_dbx_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int switch_dbx_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns 1 as long or result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or result identifier as resource on success or 0 as long on failure */
|
||||||
int switch_dbx_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int switch_dbx_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int switch_dbx_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int switch_dbx_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int switch_dbx_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module);
|
int switch_dbx_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
/* Every user visible function must have an entry in dbx_functions[].
|
/* Every user visible function must have an entry in dbx_functions[].
|
||||||
|
@ -219,7 +219,7 @@ ZEND_MINFO_FUNCTION(dbx)
|
||||||
ZEND_FUNCTION(dbx_connect)
|
ZEND_FUNCTION(dbx_connect)
|
||||||
{
|
{
|
||||||
int number_of_arguments=5;
|
int number_of_arguments=5;
|
||||||
zval ** arguments[6];
|
zval **arguments[6];
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
long module_identifier;
|
long module_identifier;
|
||||||
|
@ -301,12 +301,12 @@ ZEND_FUNCTION(dbx_connect)
|
||||||
ZEND_FUNCTION(dbx_close)
|
ZEND_FUNCTION(dbx_close)
|
||||||
{
|
{
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
zval ** dbx_handle;
|
zval **dbx_handle;
|
||||||
zval ** dbx_module;
|
zval **dbx_module;
|
||||||
zval ** dbx_database;
|
zval **dbx_database;
|
||||||
zval * rv_success;
|
zval * rv_success;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
||||||
|
@ -338,12 +338,12 @@ ZEND_FUNCTION(dbx_query)
|
||||||
{
|
{
|
||||||
int min_number_of_arguments=2;
|
int min_number_of_arguments=2;
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
zval ** dbx_handle;
|
zval **dbx_handle;
|
||||||
zval ** dbx_module;
|
zval **dbx_module;
|
||||||
zval ** dbx_database;
|
zval **dbx_database;
|
||||||
zval * rv_result_handle;
|
zval * rv_result_handle;
|
||||||
zval * rv_column_count;
|
zval * rv_column_count;
|
||||||
long col_index;
|
long col_index;
|
||||||
|
@ -351,8 +351,8 @@ ZEND_FUNCTION(dbx_query)
|
||||||
zval * info;
|
zval * info;
|
||||||
long info_flags;
|
long info_flags;
|
||||||
zval * data;
|
zval * data;
|
||||||
zval ** row_ptr;
|
zval **row_ptr;
|
||||||
zval ** inforow_ptr;
|
zval **inforow_ptr;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS()<min_number_of_arguments || ZEND_NUM_ARGS()>number_of_arguments || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), arguments) == FAILURE) {
|
if (ZEND_NUM_ARGS()<min_number_of_arguments || ZEND_NUM_ARGS()>number_of_arguments || zend_get_parameters_array_ex(ZEND_NUM_ARGS(), arguments) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -507,12 +507,12 @@ ZEND_FUNCTION(dbx_query)
|
||||||
ZEND_FUNCTION(dbx_error)
|
ZEND_FUNCTION(dbx_error)
|
||||||
{
|
{
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
zval ** dbx_handle;
|
zval **dbx_handle;
|
||||||
zval ** dbx_module;
|
zval **dbx_module;
|
||||||
zval ** dbx_database;
|
zval **dbx_database;
|
||||||
zval * rv_errormsg;
|
zval * rv_errormsg;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
||||||
|
@ -550,9 +550,9 @@ ZEND_FUNCTION(dbx_compare)
|
||||||
long comparison_type=DBX_CMP_NATIVE;
|
long comparison_type=DBX_CMP_NATIVE;
|
||||||
double dtemp;
|
double dtemp;
|
||||||
long ltemp;
|
long ltemp;
|
||||||
zval ** arguments[4];
|
zval **arguments[4];
|
||||||
zval ** zv_a;
|
zval **zv_a;
|
||||||
zval ** zv_b;
|
zval **zv_b;
|
||||||
int result=0;
|
int result=0;
|
||||||
number_of_arguments=ZEND_NUM_ARGS();
|
number_of_arguments=ZEND_NUM_ARGS();
|
||||||
if (number_of_arguments<min_number_of_arguments || number_of_arguments>max_number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
if (number_of_arguments<min_number_of_arguments || number_of_arguments>max_number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
||||||
|
@ -636,8 +636,8 @@ ZEND_FUNCTION(dbx_compare)
|
||||||
ZEND_FUNCTION(dbx_sort)
|
ZEND_FUNCTION(dbx_sort)
|
||||||
{
|
{
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval ** zval_data;
|
zval **zval_data;
|
||||||
zval * returned_zval;
|
zval * returned_zval;
|
||||||
int result=0;
|
int result=0;
|
||||||
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
if (ZEND_NUM_ARGS() !=number_of_arguments || zend_get_parameters_array_ex(number_of_arguments, arguments) == FAILURE) {
|
||||||
|
@ -668,7 +668,7 @@ ZEND_FUNCTION(dbx_sort)
|
||||||
/*
|
/*
|
||||||
* switch_dbx functions
|
* switch_dbx functions
|
||||||
*/
|
*/
|
||||||
int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_connect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_connect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -682,7 +682,7 @@ int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, z
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_pconnect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_pconnect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -696,7 +696,7 @@ int switch_dbx_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_close(rv, dbx_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_close(rv, dbx_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -710,7 +710,7 @@ int switch_dbx_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETER
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns 1 as long or result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or result identifier as resource on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_query(rv, dbx_handle, db_name, sql_statement, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_query(rv, dbx_handle, db_name, sql_statement, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -724,7 +724,7 @@ int switch_dbx_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sq
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_getcolumncount(rv, result_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_getcolumncount(rv, result_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -738,7 +738,7 @@ int switch_dbx_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTI
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_getcolumnname(rv, result_handle, column_index, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_getcolumnname(rv, result_handle, column_index, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -752,7 +752,7 @@ int switch_dbx_getcolumnname(zval ** rv, zval ** result_handle, long column_inde
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_getcolumntype(rv, result_handle, column_index, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_getcolumntype(rv, result_handle, column_index, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -766,7 +766,7 @@ int switch_dbx_getcolumntype(zval ** rv, zval ** result_handle, long column_inde
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_getrow(rv, result_handle, row_number, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_getrow(rv, result_handle, row_number, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -780,7 +780,7 @@ int switch_dbx_getrow(zval ** rv, zval ** result_handle, long row_number, INTERN
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_dbx_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_error(rv, dbx_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_error(rv, dbx_handle, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Microsoft Developer Studio Project File - Name="dbx" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="dbx" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# **DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#define MOVE_RETURNED_TO_RV(rv, returned_zval) { **rv = *returned_zval; zval_copy_ctor(*rv); zval_ptr_dtor(&returned_zval); }
|
#define MOVE_RETURNED_TO_RV(rv, returned_zval) { **rv = *returned_zval; zval_copy_ctor(*rv); zval_ptr_dtor(&returned_zval); }
|
||||||
|
|
||||||
void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval ** returnvalue, int number_of_arguments, zval *** params);
|
void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval **returnvalue, int number_of_arguments, zval *** params);
|
||||||
|
|
||||||
#endif /* ZEND_DBX_H */
|
#endif /* ZEND_DBX_H */
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
#define FBSQL_ASSOC 1<<0
|
#define FBSQL_ASSOC 1<<0
|
||||||
#define FBSQL_NUM 1<<1
|
#define FBSQL_NUM 1<<1
|
||||||
|
|
||||||
int dbx_fbsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ int dbx_fbsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -105,10 +105,10 @@ int dbx_fbsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, z
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
@ -121,10 +121,10 @@ int dbx_fbsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=db_name;
|
arguments[0]=db_name;
|
||||||
|
@ -140,10 +140,10 @@ int dbx_fbsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -156,10 +156,10 @@ int dbx_fbsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTIO
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -179,10 +179,10 @@ int dbx_fbsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -203,10 +203,10 @@ int dbx_fbsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_resulttype=NULL;
|
zval * zval_resulttype=NULL;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -225,10 +225,10 @@ int dbx_fbsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNA
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_fbsql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_fbsql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -32,23 +32,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_fbsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_fbsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_fbsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_fbsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_fbsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_fbsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_fbsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_fbsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_fbsql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_fbsql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_FBSQL_H */
|
#endif /* ZEND_DBX_FBSQL_H */
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#define MSSQL_ASSOC 1<<0
|
#define MSSQL_ASSOC 1<<0
|
||||||
#define MSSQL_NUM 1<<1
|
#define MSSQL_NUM 1<<1
|
||||||
|
|
||||||
int dbx_mssql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -66,10 +66,10 @@ int dbx_mssql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -104,10 +104,10 @@ int dbx_mssql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, z
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
@ -120,10 +120,10 @@ int dbx_mssql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -146,10 +146,10 @@ int dbx_mssql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -162,10 +162,10 @@ int dbx_mssql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTIO
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -185,10 +185,10 @@ int dbx_mssql_getcolumnname(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -209,10 +209,10 @@ int dbx_mssql_getcolumntype(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -225,10 +225,10 @@ int dbx_mssql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNA
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mssql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mssql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -31,23 +31,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_mssql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_mssql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_mssql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_mssql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_mssql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_mssql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_mssql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_mssql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_mssql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mssql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_MSSQL_H */
|
#endif /* ZEND_DBX_MSSQL_H */
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#define MYSQL_ASSOC 1<<0
|
#define MYSQL_ASSOC 1<<0
|
||||||
#define MYSQL_NUM 1<<1
|
#define MYSQL_NUM 1<<1
|
||||||
|
|
||||||
int dbx_mysql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -66,10 +66,10 @@ int dbx_mysql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -104,10 +104,10 @@ int dbx_mysql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, z
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
@ -120,10 +120,10 @@ int dbx_mysql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=db_name;
|
arguments[0]=db_name;
|
||||||
|
@ -139,10 +139,10 @@ int dbx_mysql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -155,10 +155,10 @@ int dbx_mysql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTIO
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -178,10 +178,10 @@ int dbx_mysql_getcolumnname(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -202,10 +202,10 @@ int dbx_mysql_getcolumntype(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_resulttype=NULL;
|
zval * zval_resulttype=NULL;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -224,10 +224,10 @@ int dbx_mysql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNA
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_mysql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -31,23 +31,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_mysql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_mysql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_mysql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_mysql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_mysql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_mysql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_mysql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_mysql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_mysql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_mysql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_MYSQL_H */
|
#endif /* ZEND_DBX_MYSQL_H */
|
||||||
|
|
|
@ -30,10 +30,10 @@
|
||||||
#define OCI_RETURN_NULLS 1<<2
|
#define OCI_RETURN_NULLS 1<<2
|
||||||
#define OCI_RETURN_LOBS 1<<3
|
#define OCI_RETURN_LOBS 1<<3
|
||||||
|
|
||||||
int dbx_oci8_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=username;
|
arguments[0]=username;
|
||||||
|
@ -48,10 +48,10 @@ int dbx_oci8_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zva
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=username;
|
arguments[0]=username;
|
||||||
|
@ -66,10 +66,10 @@ int dbx_oci8_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
@ -82,10 +82,10 @@ int dbx_oci8_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * execute_zval=NULL;
|
zval * execute_zval=NULL;
|
||||||
|
|
||||||
|
@ -110,10 +110,10 @@ int dbx_oci8_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -126,10 +126,10 @@ int dbx_oci8_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -150,10 +150,10 @@ int dbx_oci8_getcolumnname(zval ** rv, zval ** result_handle, long column_index,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -175,10 +175,10 @@ int dbx_oci8_getcolumntype(zval ** rv, zval ** result_handle, long column_index,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * zval_resulttype=NULL;
|
zval * zval_resulttype=NULL;
|
||||||
zval * zval_returned_array=NULL;
|
zval * zval_returned_array=NULL;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
@ -202,10 +202,10 @@ int dbx_oci8_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_oci8_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_oci8_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * returned_message_zval=NULL;
|
zval * returned_message_zval=NULL;
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -31,23 +31,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_oci8_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_oci8_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_oci8_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_oci8_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_oci8_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_oci8_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_oci8_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_oci8_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_oci8_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_oci8_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_OCI8_H */
|
#endif /* ZEND_DBX_OCI8_H */
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#define ODBC_ASSOC 1
|
#define ODBC_ASSOC 1
|
||||||
#define ODBC_NUM 2
|
#define ODBC_NUM 2
|
||||||
|
|
||||||
int dbx_odbc_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=db;
|
arguments[0]=db;
|
||||||
|
@ -46,10 +46,10 @@ int dbx_odbc_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zva
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=3;
|
int number_of_arguments=3;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=db;
|
arguments[0]=db;
|
||||||
|
@ -64,10 +64,10 @@ int dbx_odbc_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
int exit_status=EG(exit_status);
|
int exit_status=EG(exit_status);
|
||||||
|
|
||||||
|
@ -91,10 +91,10 @@ int dbx_odbc_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * queryresult_zval=NULL;
|
zval * queryresult_zval=NULL;
|
||||||
zval * num_fields_zval=NULL;
|
zval * num_fields_zval=NULL;
|
||||||
|
|
||||||
|
@ -126,10 +126,10 @@ int dbx_odbc_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -142,10 +142,10 @@ int dbx_odbc_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -165,10 +165,10 @@ int dbx_odbc_getcolumnname(zval ** rv, zval ** result_handle, long column_index,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -189,10 +189,10 @@ int dbx_odbc_getcolumntype(zval ** rv, zval ** result_handle, long column_index,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments;
|
int number_of_arguments;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * num_fields_zval=NULL;
|
zval * num_fields_zval=NULL;
|
||||||
zval * fetch_row_result_zval=NULL;
|
zval * fetch_row_result_zval=NULL;
|
||||||
zval * field_result_zval=NULL;
|
zval * field_result_zval=NULL;
|
||||||
|
@ -247,10 +247,10 @@ int dbx_odbc_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_odbc_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_odbc_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -31,23 +31,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_odbc_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_odbc_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persisten connection handle as resource on success or 0 as long on failure */
|
/* returns persisten connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_odbc_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_odbc_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_odbc_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_odbc_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_odbc_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_odbc_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_odbc_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_odbc_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_ODBC_H */
|
#endif /* ZEND_DBX_ODBC_H */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define PGSQL_ASSOC 1<<0
|
#define PGSQL_ASSOC 1<<0
|
||||||
#define PGSQL_NUM 1<<1
|
#define PGSQL_NUM 1<<1
|
||||||
|
|
||||||
int dbx_pgsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int nargs=5;
|
int nargs=5;
|
||||||
char *port="5432", *connstring=NULL;
|
char *port="5432", *connstring=NULL;
|
||||||
|
@ -71,7 +71,7 @@ int dbx_pgsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int nargs=5;
|
int nargs=5;
|
||||||
char *port="5432", *connstring=NULL;
|
char *port="5432", *connstring=NULL;
|
||||||
|
@ -116,10 +116,10 @@ int dbx_pgsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, z
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
@ -132,7 +132,7 @@ int dbx_pgsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns 1 as long or a result identifier as resource on success
|
/* returns 1 as long or a result identifier as resource on success
|
||||||
or 0 as long on failure */
|
or 0 as long on failure */
|
||||||
int nargs=2;
|
int nargs=2;
|
||||||
|
@ -154,10 +154,10 @@ int dbx_pgsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=result_handle;
|
arguments[0]=result_handle;
|
||||||
|
@ -170,10 +170,10 @@ int dbx_pgsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTIO
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -193,10 +193,10 @@ int dbx_pgsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_column_index;
|
zval * zval_column_index;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -217,11 +217,11 @@ int dbx_pgsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int number_of_arguments=2;
|
int number_of_arguments=2;
|
||||||
int save_error_reporting=0;
|
int save_error_reporting=0;
|
||||||
zval ** arguments[2];
|
zval **arguments[2];
|
||||||
zval * zval_row=NULL;
|
zval * zval_row=NULL;
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
|
@ -248,10 +248,10 @@ int dbx_pgsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNA
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbx_pgsql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_pgsql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
/* returns string */
|
/* returns string */
|
||||||
int number_of_arguments=1;
|
int number_of_arguments=1;
|
||||||
zval ** arguments[1];
|
zval **arguments[1];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
|
|
||||||
arguments[0]=dbx_handle;
|
arguments[0]=dbx_handle;
|
||||||
|
|
|
@ -27,23 +27,23 @@
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
int dbx_pgsql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns connection handle as resource on success or 0 as long on failure */
|
/* returns connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_pgsql_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_pconnect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
/* returns persistent connection handle as resource on success or 0 as long on failure */
|
||||||
int dbx_pgsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long on success or 0 as long on failure */
|
/* returns 1 as long on success or 0 as long on failure */
|
||||||
int dbx_pgsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_statement, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
/* returns 1 as long or a result identifier as resource on success or 0 as long on failure */
|
||||||
int dbx_pgsql_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-count as long on success or 0 as long on failure */
|
/* returns column-count as long on success or 0 as long on failure */
|
||||||
int dbx_pgsql_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_getcolumnname(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-name as string on success or 0 as long on failure */
|
/* returns column-name as string on success or 0 as long on failure */
|
||||||
int dbx_pgsql_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_getcolumntype(zval **rv, zval **result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns column-type as string on success or 0 as long on failure */
|
/* returns column-type as string on success or 0 as long on failure */
|
||||||
int dbx_pgsql_getrow(zval ** rv, zval ** result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
|
||||||
int dbx_pgsql_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
int dbx_pgsql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
/* returns string */
|
/* returns string */
|
||||||
|
|
||||||
#endif /* ZEND_DBX_PGSQL_H */
|
#endif /* ZEND_DBX_PGSQL_H */
|
||||||
|
|
|
@ -135,7 +135,7 @@ ZEND_MINFO_FUNCTION(dbx)
|
||||||
</pre>
|
</pre>
|
||||||
Finally, for the implementation of all switch_dbx_XXXXX functions, copy a 'case'-line for every function that you support (should be all functions!). Here is an example for only the switch_dbx_connect function:<br>
|
Finally, for the implementation of all switch_dbx_XXXXX functions, copy a 'case'-line for every function that you support (should be all functions!). Here is an example for only the switch_dbx_connect function:<br>
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module) {
|
int switch_dbx_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS, zval **dbx_module) {
|
||||||
// returns connection handle as resource on success or 0 as long on failure
|
// returns connection handle as resource on success or 0 as long on failure
|
||||||
switch ((*dbx_module)->value.lval) {
|
switch ((*dbx_module)->value.lval) {
|
||||||
case DBX_MYSQL: return dbx_mysql_connect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
case DBX_MYSQL: return dbx_mysql_connect(rv, host, db, username, password, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||||
|
@ -177,11 +177,11 @@ In dbx.h one macro and one function are defined to make the calling of external
|
||||||
<p>
|
<p>
|
||||||
The details of what each of the functions do, what parameters they get, and what parameters they should return are discussed below. But first, the dbx_mysql_connect function is presented and explained, so you get an idea of how things work.<br>
|
The details of what each of the functions do, what parameters they get, and what parameters they should return are discussed below. But first, the dbx_mysql_connect function is presented and explained, so you get an idea of how things work.<br>
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
int dbx_mysql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS) {
|
int dbx_mysql_connect(zval **rv, zval **host, zval **db, zval **username, zval **password, INTERNAL_FUNCTION_PARAMETERS) {
|
||||||
// returns connection handle as resource on success or 0 as long on
|
// returns connection handle as resource on success or 0 as long on
|
||||||
// failure
|
// failure
|
||||||
int number_of_arguments;
|
int number_of_arguments;
|
||||||
zval ** arguments[3];
|
zval **arguments[3];
|
||||||
zval * returned_zval=NULL;
|
zval * returned_zval=NULL;
|
||||||
zval * select_db_zval=NULL;
|
zval * select_db_zval=NULL;
|
||||||
|
|
||||||
|
@ -208,11 +208,11 @@ int dbx_mysql_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zv
|
||||||
First of all, all functions return 0 on failure and 1 on success. These values are used in the dbx-routines, they are never actually given back to the PHP-script writer that calls the dbx_connect function.<br>
|
First of all, all functions return 0 on failure and 1 on success. These values are used in the dbx-routines, they are never actually given back to the PHP-script writer that calls the dbx_connect function.<br>
|
||||||
The actual value that is of interest to the caller is returned in the <span class="bold">rv</span> parameter. In this case it is a connection handle (or link identifier, in mysql-speak), that is also returned if the database selection doesn't succeed. <br>
|
The actual value that is of interest to the caller is returned in the <span class="bold">rv</span> parameter. In this case it is a connection handle (or link identifier, in mysql-speak), that is also returned if the database selection doesn't succeed. <br>
|
||||||
The parameters that are of interest to the function are located between the <span class="bold">rv</span> and <span class="bold">INTERNAL_FUNCTION_PARAMETERS</span> parameters, in this case it is a <span class="bold">host</span> name, a <span class="bold">db</span> name, a <span class="bold">username</span> and a <span class="bold">password</span>. These are the values that the user specifies if he calls dbx_connect(); These parameters are used in the calls to the mysql-database functions. The user actually also specifies a module-name, that decides which connect-function should be called. Here, he specified 'mysql'.<br>
|
The parameters that are of interest to the function are located between the <span class="bold">rv</span> and <span class="bold">INTERNAL_FUNCTION_PARAMETERS</span> parameters, in this case it is a <span class="bold">host</span> name, a <span class="bold">db</span> name, a <span class="bold">username</span> and a <span class="bold">password</span>. These are the values that the user specifies if he calls dbx_connect(); These parameters are used in the calls to the mysql-database functions. The user actually also specifies a module-name, that decides which connect-function should be called. Here, he specified 'mysql'.<br>
|
||||||
To actually call a mysql module function, you can use <span class="bold">dbx_call_any_function</span> where you specify the function name (it is used twice in dbx_mysql_connect, see <span class="bold">'mysql_connect'</span> and <span class="bold">'mysql_select_db'</span>, they are printed bold in the code). The value that is returned from the function will be stored in the next argument, a zval * (e.g. <span class="bold">returned_zval</span>) parameter that you must declare locally. To actually return such a parameter, use the <span class="bold">MOVE_RETURNED_TO_RV(rv, returned_zval)</span> macro, which copies the values to <span class="bold">rv</span> and frees anything that may be left in <span class="bold">returned_zval</span>. Parameters that must be passed to the mysql-function are stored in the <span class="bold">arguments</span> array, which must be large enough to hold all parameters to the function-call that requires the most parameters (in this case, mysql_connect expects 3 parameters, mysql_select_db expects two parameters, so the <span class="bold">arguments</span> array is defined 'zval ** arguments[<span class="bold">3</span>]'). The <span class="bold">number_of_arguments</span> parameter is set to the actual number of arguments that the function-call requires. As you can see it is initialized to 3, for the first call to mysql_connect. Then it is set to 2, for the call to mysql_select_db. If you call a function that retrieves a value, and you don't return it with MOVE_RETURNED_TO_RV, then you must free the value using <span class="bold">zval_ptr_dtor</span>, as can be seen right after the call to mysql_select_db. This can also be seen directly after the call to mysql_connect, if somehow this function failed or didn't return a resource (on a successful connect mysql_connect returns a resource) the returned value is freed as well (and 0 is returned because the connection failed).<br>
|
To actually call a mysql module function, you can use <span class="bold">dbx_call_any_function</span> where you specify the function name (it is used twice in dbx_mysql_connect, see <span class="bold">'mysql_connect'</span> and <span class="bold">'mysql_select_db'</span>, they are printed bold in the code). The value that is returned from the function will be stored in the next argument, a zval * (e.g. <span class="bold">returned_zval</span>) parameter that you must declare locally. To actually return such a parameter, use the <span class="bold">MOVE_RETURNED_TO_RV(rv, returned_zval)</span> macro, which copies the values to <span class="bold">rv</span> and frees anything that may be left in <span class="bold">returned_zval</span>. Parameters that must be passed to the mysql-function are stored in the <span class="bold">arguments</span> array, which must be large enough to hold all parameters to the function-call that requires the most parameters (in this case, mysql_connect expects 3 parameters, mysql_select_db expects two parameters, so the <span class="bold">arguments</span> array is defined 'zval **arguments[<span class="bold">3</span>]'). The <span class="bold">number_of_arguments</span> parameter is set to the actual number of arguments that the function-call requires. As you can see it is initialized to 3, for the first call to mysql_connect. Then it is set to 2, for the call to mysql_select_db. If you call a function that retrieves a value, and you don't return it with MOVE_RETURNED_TO_RV, then you must free the value using <span class="bold">zval_ptr_dtor</span>, as can be seen right after the call to mysql_select_db. This can also be seen directly after the call to mysql_connect, if somehow this function failed or didn't return a resource (on a successful connect mysql_connect returns a resource) the returned value is freed as well (and 0 is returned because the connection failed).<br>
|
||||||
<p>
|
<p>
|
||||||
OK, now the description of all functions that you should implement, and what is expected of them...<br>
|
OK, now the description of all functions that you should implement, and what is expected of them...<br>
|
||||||
<a name="connect"></a><pre class="code">
|
<a name="connect"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_connect</span>(zval ** rv, zval ** <span class="fn-param">host</span>, zval ** <span class="fn-param">db</span>, zval ** <span class="fn-param">username</span>, zval ** <span class="fn-param">password</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_connect</span>(zval **rv, zval **<span class="fn-param">host</span>, zval **<span class="fn-param">db</span>, zval **<span class="fn-param">username</span>, zval **<span class="fn-param">password</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on connect-failure and 1 on success
|
// int: returns 0 on connect-failure and 1 on success
|
||||||
// rv: connection handle as resource on success or nothing on failure
|
// rv: connection handle as resource on success or nothing on failure
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -223,14 +223,14 @@ The host (string) is the name of the machine the server is run on, but it may be
|
||||||
The db (string) is the name of the database to select, or, for e.g. ODBC, the identifier that is needed to actually select the database.<br>
|
The db (string) is the name of the database to select, or, for e.g. ODBC, the identifier that is needed to actually select the database.<br>
|
||||||
The username (string) and password (string) are used for authentication.<br>
|
The username (string) and password (string) are used for authentication.<br>
|
||||||
<a name="pconnect"></a><pre class="code">
|
<a name="pconnect"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_pconnect</span>(zval ** rv, zval ** <span class="fn-param">host</span>, zval ** <span class="fn-param">db</span>, zval ** <span class="fn-param">username</span>, zval ** <span class="fn-param">password</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_pconnect</span>(zval **rv, zval **<span class="fn-param">host</span>, zval **<span class="fn-param">db</span>, zval **<span class="fn-param">username</span>, zval **<span class="fn-param">password</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on pconnect-failure and 1 on success
|
// int: returns 0 on pconnect-failure and 1 on success
|
||||||
// rv: persistent connection handle as resource on success or nothing
|
// rv: persistent connection handle as resource on success or nothing
|
||||||
// on failure
|
// on failure
|
||||||
</pre>
|
</pre>
|
||||||
dbx_blabla_pconnect is identical to dbx_blabla_connect except that it will create a persistent connection.<br>
|
dbx_blabla_pconnect is identical to dbx_blabla_connect except that it will create a persistent connection.<br>
|
||||||
<a name="close"></a><pre class="code">
|
<a name="close"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_close</span>(zval ** rv, zval ** <span class="fn-param">dbx_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_close</span>(zval **rv, zval **<span class="fn-param">dbx_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on close-failure and 1 on success
|
// int: returns 0 on close-failure and 1 on success
|
||||||
// rv: 1 as bool on success or nothing on failure
|
// rv: 1 as bool on success or nothing on failure
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -239,7 +239,7 @@ What must be returned (in <span class="bold">rv</span>) is a boolean true that i
|
||||||
What must be returned from the function is a 1 on success and a 0 on failure. Note that an unsuccessful close is still a succeeded function call.<br>
|
What must be returned from the function is a 1 on success and a 0 on failure. Note that an unsuccessful close is still a succeeded function call.<br>
|
||||||
The dbx_handle is the same value that you returned from dbx_blabla_connect or dbx_blabla_pconnect.<br>
|
The dbx_handle is the same value that you returned from dbx_blabla_connect or dbx_blabla_pconnect.<br>
|
||||||
<a name="query"></a><pre class="code">
|
<a name="query"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_query</span>(zval ** rv, zval ** <span class="fn-param">dbx_handle</span>, zval ** <span class="fn-param">sql_statement</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_query</span>(zval **rv, zval **<span class="fn-param">dbx_handle</span>, zval **<span class="fn-param">sql_statement</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on query-failure and 1 on success
|
// int: returns 0 on query-failure and 1 on success
|
||||||
// rv: 1 as bool or a result identifier as resource on success
|
// rv: 1 as bool or a result identifier as resource on success
|
||||||
// or nothing on failure
|
// or nothing on failure
|
||||||
|
@ -250,7 +250,7 @@ What must be returned from the function is a 1 on success and a 0 on failure. No
|
||||||
The dbx_handle is the same value that you returned from dbx_blabla_connect or dbx_blabla_pconnect.<br>
|
The dbx_handle is the same value that you returned from dbx_blabla_connect or dbx_blabla_pconnect.<br>
|
||||||
The sql_statement (string) can have any value.<br>
|
The sql_statement (string) can have any value.<br>
|
||||||
<a name="getcolumncount"></a><pre class="code">
|
<a name="getcolumncount"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_getcolumncount</span>(zval ** rv, zval ** <span class="fn-param">result_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_getcolumncount</span>(zval **rv, zval **<span class="fn-param">result_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on query-failure and 1 on success
|
// int: returns 0 on query-failure and 1 on success
|
||||||
// returns column-count as long on success or nothing on failure
|
// returns column-count as long on success or nothing on failure
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -259,7 +259,7 @@ What must be returned (in <span class="bold">rv</span>) is the number of fields
|
||||||
What must be returned from the function is a 1 on success and a 0 on failure. <br>
|
What must be returned from the function is a 1 on success and a 0 on failure. <br>
|
||||||
The result_handle is the same value that you returned from dbx_query.<br>
|
The result_handle is the same value that you returned from dbx_query.<br>
|
||||||
<a name="getcolumnname"></a><pre class="code">
|
<a name="getcolumnname"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_getcolumnname</span>(zval ** rv, zval ** <span class="fn-param">result_handle</span>, long <span class="fn-param">column_index</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_getcolumnname</span>(zval **rv, zval **<span class="fn-param">result_handle</span>, long <span class="fn-param">column_index</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on failure and 1 on success
|
// int: returns 0 on failure and 1 on success
|
||||||
// returns column-name as string on success or nothing on failure
|
// returns column-name as string on success or nothing on failure
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -269,7 +269,7 @@ What must be returned from the function is a 1 on success and a 0 on failure. <b
|
||||||
The result_handle is the same value that you returned from dbx_query.<br>
|
The result_handle is the same value that you returned from dbx_query.<br>
|
||||||
The column_index is a long that ranges from 0 to the value you returned from dbx_blabla_getcolumncount minus 1 [0..columncount-1].<br>
|
The column_index is a long that ranges from 0 to the value you returned from dbx_blabla_getcolumncount minus 1 [0..columncount-1].<br>
|
||||||
<a name="getcolumntype"></a><pre class="code">
|
<a name="getcolumntype"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_getcolumntype</span>(zval ** rv, zval ** <span class="fn-param">result_handle</span>, long <span class="fn-param">column_index</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_getcolumntype</span>(zval **rv, zval **<span class="fn-param">result_handle</span>, long <span class="fn-param">column_index</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on failure and 1 on success
|
// int: returns 0 on failure and 1 on success
|
||||||
// returns column-type as string on success or nothing on failure
|
// returns column-type as string on success or nothing on failure
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -279,7 +279,7 @@ What must be returned from the function is a 1 on success and a 0 on failure. <b
|
||||||
The result_handle is the same value that you returned from dbx_query.<br>
|
The result_handle is the same value that you returned from dbx_query.<br>
|
||||||
The column_index is a long that ranges from 0 to the value you returned from dbx_blabla_getcolumncount minus 1 [0..columncount-1].<br>
|
The column_index is a long that ranges from 0 to the value you returned from dbx_blabla_getcolumncount minus 1 [0..columncount-1].<br>
|
||||||
<a name="getrow"></a><pre class="code">
|
<a name="getrow"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_getrow</span>(zval ** rv, zval ** <span class="fn-param">result_handle</span>, long <span class="fn-param">row_number</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_getrow</span>(zval **rv, zval **<span class="fn-param">result_handle</span>, long <span class="fn-param">row_number</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on failure and 1 on success
|
// int: returns 0 on failure and 1 on success
|
||||||
// returns array[0..columncount-1] as strings on success or 0 as long
|
// returns array[0..columncount-1] as strings on success or 0 as long
|
||||||
// on failure
|
// on failure
|
||||||
|
@ -290,7 +290,7 @@ What must be returned (in <span class="bold">rv</span>) is an indexed array[0..c
|
||||||
What must be returned from the function is a 1 on success and a 0 on failure (function failed or there are no more rows available). <br>
|
What must be returned from the function is a 1 on success and a 0 on failure (function failed or there are no more rows available). <br>
|
||||||
The result_handle is the same value that you returned from dbx_query.<br>
|
The result_handle is the same value that you returned from dbx_query.<br>
|
||||||
<a name="error"></a><pre class="code">
|
<a name="error"></a><pre class="code">
|
||||||
int <span class="fn-name">dbx_blabla_error</span>(zval ** rv, zval ** <span class="fn-param">dbx_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
int <span class="fn-name">dbx_blabla_error</span>(zval **rv, zval **<span class="fn-param">dbx_handle</span>, INTERNAL_FUNCTION_PARAMETERS);
|
||||||
// int: returns 0 on failure and 1 on success
|
// int: returns 0 on failure and 1 on success
|
||||||
// returns error message as string
|
// returns error message as string
|
||||||
</pre>
|
</pre>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue