From: Andrea Zagli Date: Tue, 15 Dec 2015 10:46:01 +0000 (+0100) Subject: Error only when sql insert and update executions return not 1. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=4f5add9f6eba1385e1b685c4a8e0ba07388ebe15;p=zakform%2Fgdaex Error only when sql insert and update executions return not 1. --- diff --git a/src/form.c b/src/form.c index 53d93bf..2b5ea3a 100644 --- a/src/form.c +++ b/src/form.c @@ -391,7 +391,7 @@ zak_form_gdaex_provider_insert (ZakFormIProvider *provider, GPtrArray *elements) } - if (gdaex_sql_builder_execute (sqlb, priv->gdaex, NULL) <= 0) + if (gdaex_sql_builder_execute (sqlb, priv->gdaex, NULL) != 1) { ret = FALSE; } @@ -456,7 +456,7 @@ zak_form_gdaex_provider_update (ZakFormIProvider *provider, GPtrArray *elements) } } - if (gdaex_sql_builder_execute (sqlb, priv->gdaex, NULL) <= 0) + if (gdaex_sql_builder_execute (sqlb, priv->gdaex, NULL) != 1) { ret = FALSE; }