From c1e9d3433d4a847adefddd52e6f8af88ad739311 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 13 Apr 2005 21:27:35 +0000 Subject: [PATCH] - Fixed bug #32699 (pg_affected_rows() was defined when it was not available). --- NEWS | 2 ++ ext/pgsql/pgsql.c | 4 ++++ ext/pgsql/php_pgsql.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 109373ce2f..9c2f3de485 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP 4 NEWS ?? ??? 20??, Version 4.?.? - Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes them sort based on the current locale. (Derick) +- Fixed bug #32699 (pg_affected_rows() was defined when it was not available). + (Derick) - Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani) - Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets). (Ilia) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index be536c83b1..e16455ff11 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -100,7 +100,9 @@ function_entry pgsql_functions[] = { PHP_FE(pg_fetch_array, NULL) PHP_FE(pg_fetch_object, NULL) PHP_FE(pg_fetch_all, NULL) +#if HAVE_PQCMDTUPLES PHP_FE(pg_affected_rows,NULL) +#endif PHP_FE(pg_get_result, NULL) PHP_FE(pg_result_seek, NULL) PHP_FE(pg_result_status,NULL) @@ -1077,6 +1079,7 @@ PHP_FUNCTION(pg_num_fields) } /* }}} */ +#if HAVE_PQCMDTUPLES /* {{{ proto int pg_affected_rows(resource result) Returns the number of affected tuples */ PHP_FUNCTION(pg_affected_rows) @@ -1084,6 +1087,7 @@ PHP_FUNCTION(pg_affected_rows) php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_CMD_TUPLES); } /* }}} */ +#endif /* {{{ proto string pg_last_notice(resource connection) Returns the last notice set by the backend */ diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index afad746c6c..b1cecdf8d5 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -83,7 +83,9 @@ PHP_FUNCTION(pg_fetch_object); PHP_FUNCTION(pg_fetch_result); PHP_FUNCTION(pg_fetch_row); PHP_FUNCTION(pg_fetch_all); +#if HAVE_PQCMDTUPLES PHP_FUNCTION(pg_affected_rows); +#endif PHP_FUNCTION(pg_get_result); PHP_FUNCTION(pg_result_seek); PHP_FUNCTION(pg_result_status); -- 2.50.1