Home » U++ Library support » U++ SQL » Bugfix: MySqlConnection::GetRowsProcessed() returns correct value after an sql update
Bugfix: MySqlConnection::GetRowsProcessed() returns correct value after an sql update [message #43214] |
Sun, 08 June 2014 18:58 |
zsolt
Messages: 698 Registered: December 2005 Location: Budapest, Hungary
|
Contributor |
|
|
The patch:
---------------------------- uppsrc/MySql/MySql.cpp ----------------------------
index 45bfc43..ee8d848 100644
@@ -361,16 +361,18 @@ bool MySqlConnection::Execute() {
lastid = (int)mysql_insert_id(mysql);
if(lastid) {
SqlColumnInfo& f = info.Add();
f.width = f.scale = f.precision = 0;
f.binary = false;
f.type = DOUBLE_V;
f.name = "LAST_INSERT_ID";
rows = 1;
+ }else{
+ rows = (int)mysql_affected_rows(mysql);
}
}
return true;
}
int MySqlConnection::GetRowsProcessed() const {
return rows;
}
|
|
|
|
|
Goto Forum:
Current Time: Thu May 23 16:42:19 CEST 2024
Total time taken to generate the page: 0.02544 seconds
|