Ver Fonte

patched MyqlResultSet.getLength()

Franco Ponticelli há 17 anos atrás
pai
commit
6e0392520c
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      std/php/db/Mysql.hx

+ 5 - 1
std/php/db/Mysql.hx

@@ -87,9 +87,13 @@ private class MysqlResultSet implements ResultSet {
 	}
 
 	private function getLength() {
+		if(untyped __physeq__(__r, true))
+			return untyped __call__("mysql_affected_rows");
+		else if (untyped __physeq__(__r, false))
+			return 0;
 		return untyped __call__("mysql_num_rows", __r);
 	}
-
+	
 	private var _nfields : Int;
 	private function getNFields() {
 		if(_nfields == null)