cvs: php4 /ext/pgsql pgsql.c
| From: | Yasuo Ohgaki | Date: | Mon, 08 Apr 2002 00:50:44 +0000 |
| Subject: | cvs: php4 /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10955@lists.php.net to get a copy of this message | ||
yohgaki Sun Apr 7 20:50:44 2002 EDT
Modified files:
/php4/ext/pgsql pgsql.c
Log:
Return proper result.
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.172 php4/ext/pgsql/pgsql.c:1.173
--- php4/ext/pgsql/pgsql.c:1.172 Sun Apr 7 20:43:58 2002
+++ php4/ext/pgsql/pgsql.c Sun Apr 7 20:50:44 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.172 2002/04/08 00:43:58 yohgaki Exp $ */
+/* $Id: pgsql.c,v 1.173 2002/04/08 00:50:44 yohgaki Exp $ */
#include <stdlib.h>
@@ -2679,11 +2679,11 @@
pgsql_result = pg_result->result;
if (result_type == PGSQL_STATUS_LONG) {
- RETURN_STRING(PQcmdStatus(pgsql_result), 1);
- }
- else if (result_type == PGSQL_STATUS_STRING) {
status = PQresultStatus(pgsql_result);
RETURN_LONG((int)status);
+ }
+ else if (result_type == PGSQL_STATUS_STRING) {
+ RETURN_STRING(PQcmdStatus(pgsql_result), 1);
}
else {
php_error(E_WARNING, "%s() expects optional 2nd parameter to be PGSQL_STATUS_LONG or
PGSQL_STATUS_STRING",