I have a function which needs the number of rows returned by a select. After some googling i found the FOUND_ROWS() function. But i don't think it works:
SELECT * FROM tipfirme LIMIT 20;
SELECT FOUND_ROWS();
because it always returns 1 as the found value.
However, if i run it in one line, it works.
SELECT FOUND_ROWS() FROM (SELECT * FROM tipfirme LIMIT 20) as T
Am i doing something wrong or is the function broken?