diff options
author | pixel <pixel> | 2007-08-13 16:02:33 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-08-13 16:02:33 +0000 |
commit | 8f30c6dd235bdafb9722daf90c0bc38852a1b2b5 (patch) | |
tree | 2c544ddce4978d50883aa8eeb3eb5e2add00f60b | |
parent | d8be7311dd265538d8ce0b73edef4c27b870ebfa (diff) |
Fixing 'insertid' and 'affectedrows' results.
-rw-r--r-- | lib/SQL.cc | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |