summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/SQL.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/SQL.cc b/lib/SQL.cc
index 4bfcdc0..7e2050d 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: SQL.cc,v 1.15 2007-06-19 13:39:34 pixel Exp $ */
+/* $Id: SQL.cc,v 1.16 2007-08-13 16:02:33 pixel Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -72,15 +72,13 @@ int SQLConnection::query(const String & q) {
nr = mysql_num_rows(res);
nf = mysql_num_fields(res);
fields = mysql_fetch_fields(res);
- na = mysql_affected_rows(con);
- ii = mysql_insert_id(con);
} else {
nr = 0;
nf = 0;
fields = 0;
- na = 0;
- ii = -1;
}
+ na = mysql_affected_rows(con);
+ ii = mysql_insert_id(con);
return r;
}