cvs: php4 /ext/pgsql pgsql.c

From: Date: Mon, 22 Apr 2002 08:18:36 +0000
Subject: cvs: php4 /ext/pgsql pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11303@lists.php.net to get a copy of this message
sas Mon Apr 22 04:18:36 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: hash keys lengths include the NUL-byte, so we need to copy one byte less. also add missing commas in the INSERT clause. Noticed by: Yasuo Ohgaki Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.192 php4/ext/pgsql/pgsql.c:1.193 --- php4/ext/pgsql/pgsql.c:1.192 Sun Apr 21 07:29:17 2002 +++ php4/ext/pgsql/pgsql.c Mon Apr 22 04:18:19 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.192 2002/04/21 11:29:17 sas Exp $ */ +/* $Id: pgsql.c,v 1.193 2002/04/22 08:18:19 sas Exp $ */ #include <stdlib.h> @@ -3908,9 +3908,11 @@ get_active_function_name(TSRMLS_C)); goto cleanup; } - smart_str_appendl(&querystr, fld, fld_len); + smart_str_appendl(&querystr, fld, fld_len - 1); + smart_str_appendc(&querystr, ','); zend_hash_move_forward_ex(Z_ARRVAL_P(var_array), &pos); } + querystr.len--; smart_str_appends(&querystr, ") VALUES ("); /* make values string */ @@ -4004,7 +4006,7 @@ get_active_function_name(TSRMLS_C)); return -1; } - smart_str_appendl(querystr, fld, fld_len); + smart_str_appendl(querystr, fld, fld_len - 1); smart_str_appendc(querystr, '='); switch(Z_TYPE_PP(val)) {

« previous php.cvs (#11303) next »