From b6935efc8e7bec39999bc681b2a185b0d778dbfd Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Thu, 17 Dec 2015 09:15:57 +0900 Subject: Implemented FR #48532 (Allow pg_fetch_all() to index numerically). --- ext/pgsql/php_pgsql.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/pgsql/php_pgsql.h') diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 147c3e6d6e..e58d05b606 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -210,7 +210,7 @@ PHP_FUNCTION(pg_select); #define PGSQL_DML_ASYNC (1<<10) /* Do async query */ #define PGSQL_DML_STRING (1<<11) /* Return query string */ #define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */ - +#define PGSQL_FETCH_NUM (1<<13) /* Fetch result with numeric index */ /* exported functions */ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended); @@ -219,7 +219,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *val PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql); PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_ulong opt, zend_string **sql); PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, zend_string **sql ); -PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array); +PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, zend_bool numeric_index); /* internal functions */ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent); -- cgit v1.2.1 From 283cbebe5b80f7e4f69279d72035c235a77c943b Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Fri, 18 Dec 2015 15:50:57 +0900 Subject: Improve FR #48532 implementation (Allow pg_fetch_all() to index numerically). Made result type option be consistent with pg_fetch_row(). --- ext/pgsql/php_pgsql.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/pgsql/php_pgsql.h') diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index e58d05b606..fac37f42fa 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -210,7 +210,6 @@ PHP_FUNCTION(pg_select); #define PGSQL_DML_ASYNC (1<<10) /* Do async query */ #define PGSQL_DML_STRING (1<<11) /* Return query string */ #define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */ -#define PGSQL_FETCH_NUM (1<<13) /* Fetch result with numeric index */ /* exported functions */ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended); @@ -218,8 +217,8 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_ulong opt, zend_string **sql); PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql); PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_ulong opt, zend_string **sql); -PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, zend_string **sql ); -PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, zend_bool numeric_index); +PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, long fetch_option, zend_string **sql ); +PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option); /* internal functions */ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent); -- cgit v1.2.1 From 49493a2dcfb2cd1758b69b13d9006ead3be0e066 Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Fri, 1 Jan 2016 19:19:27 +0200 Subject: Happy new year (Update copyright to 2016) --- ext/pgsql/php_pgsql.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pgsql/php_pgsql.h') diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 560a47e327..0234aff092 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1