I am trying to write mysql procedure for below logic,
select id, fullname from users where fullname like concat(lastname, \' \', firstname, \' (\' , middlena
Include SQL_CALC_FOUND_ROWS in your cursor select.Then on fetch use FOUND_ROWS(). It gives the number of records