From: Derick Rethans Date: Wed, 13 Apr 2005 21:46:32 +0000 (+0000) Subject: - MF43: Fixed bug #32699 (pg_affected_rows() was defined when it was not X-Git-Tag: php-5.0.5RC1~440 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a650df8daf17846a34eb444bf840b1122326bbe;p=php - MF43: Fixed bug #32699 (pg_affected_rows() was defined when it was not available). --- diff --git a/NEWS b/NEWS index c98ccfd88e..b40b760ebb 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2005, PHP 5.0.5 - Removed php_check_syntax() function, never worked properly. (Ilia) +- Fixed bug #32699 (pg_affected_rows() was defined when it was not available). + (Derick) - Fixed bug #32615 (Segfault in replaceChild() using fragment when previousSibling is NULL). (Rob) - Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 414e2050ec..32f5a7e8e6 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -105,7 +105,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) @@ -1156,6 +1158,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) @@ -1163,6 +1166,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 f25acc9072..ceb9a73299 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -86,7 +86,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);