cvs: pecl /dbdo dbdo.c

From: Date: Wed, 06 Apr 2005 17:40:15 +0000
Subject: cvs: pecl /dbdo dbdo.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2937@lists.php.net to get a copy of this message
alan_k Wed Apr 6 13:40:15 2005 EDT Modified files: /pecl/dbdo dbdo.c Log: insert allowed on emtpy results. http://cvs.php.net/diff.php/pecl/dbdo/dbdo.c?r1=1.85&r2=1.86&ty=u Index: pecl/dbdo/dbdo.c diff -u pecl/dbdo/dbdo.c:1.85 pecl/dbdo/dbdo.c:1.86 --- pecl/dbdo/dbdo.c:1.85 Wed Apr 6 13:32:00 2005 +++ pecl/dbdo/dbdo.c Wed Apr 6 13:40:15 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dbdo.c,v 1.85 2005/04/06 17:32:00 alan_k Exp $ */ +/* $Id: dbdo.c,v 1.86 2005/04/06 17:40:15 alan_k Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -583,7 +583,7 @@ GdaProviderInfo *info; php_info_print_table_start(); php_info_print_table_header(2, "DBDO support", "enabled"); - php_info_print_table_row(2, "CVS id", "$Id: dbdo.c,v 1.85 2005/04/06 17:32:00 alan_k Exp $"); + php_info_print_table_row(2, "CVS id", "$Id: dbdo.c,v 1.86 2005/04/06 17:40:15 alan_k Exp $"); prov_list = gda_config_get_provider_list (); @@ -1394,7 +1394,7 @@ } - rows = gda_data_model_get_n_rows (obj->result); + rows = gda_data_model_get_n_rows (obj->result); if (rows < 1) { /* we should keep obj->result, so that fetchAll works on empty results. @@ -2247,7 +2247,8 @@ return; } - if (obj->result) { + + if (obj->result && (gda_data_model_get_n_rows (obj->result) > 0)) { php_error(E_ERROR,"DBDO::insert(), you can not insert from an existing result, \n" "use: $new->assignFrom($do); $new->insert() ");

« previous php.pecl.cvs (#2937) next »