How we can use mysql_affected_rows()
in stored procedure..
Use the ROW_COUNT() information function.
ROW_COUNT() returns the number of rows changed, deleted, or inserted by the last statement if it was an UPDATE, DELETE, or INSERT. For other statements, the value may not be meaningful.
The ROW_COUNT() value is the same as the value from the mysql_affected_rows() C API function and the row count that the mysql client displays following statement execution.