Estimados, buenas tardes
Alguno de ustedes sabe como obtener la cantidad de registros afectados por una sentencia UPDATE en MySQL, la funcion que parece devolver esto es mysql_affected_rows() pero no consigo que me devuelva el dato ... algun ejemplo.
Gracias
Cantidad de registros afectados en un UPDATE
-
- Posts: 560
- Joined: Fri Oct 07, 2005 2:17 pm
- Location: Lima - Peru
- Been thanked: 3 times
- Contact:
Cantidad de registros afectados en un UPDATE
Enrrique Vertiz Pitta
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
-
- Posts: 105
- Joined: Sun Oct 09, 2005 3:09 pm
- Location: Mexico
Re: Cantidad de registros afectados en un UPDATE
Buenas noches, podrías usar el metodo execute del objeto coneccion, la documentacion indica lo siguiente:
METHOD Execute( cSqlStatement, [params], [lShowError] ) --> uResult
(Can also use oCn:SqlQuery(...) )
uResult can be
a) nil if there is no result or if error occured.
In case of error, oCn:nError and oCn:cError provide teh error information
Optionally setting lShowError displays ther error or result of sql statement,
b) Numeric: In case of insert, update, etc indicating the affected rows
c) If the result is a result-set, it is returned as Multi-Dim array
Saludos
METHOD Execute( cSqlStatement, [params], [lShowError] ) --> uResult
(Can also use oCn:SqlQuery(...) )
uResult can be
a) nil if there is no result or if error occured.
In case of error, oCn:nError and oCn:cError provide teh error information
Optionally setting lShowError displays ther error or result of sql statement,
b) Numeric: In case of insert, update, etc indicating the affected rows
c) If the result is a result-set, it is returned as Multi-Dim array
Saludos