>I going to design a system that will search the member who brought the most member join into the club. I open a table which have two column in such as member code and introducer. I use do while loop to search for member will make the program endless loop
>or infinite loop. Is there any other way to do it. any suggestion?
>
>Sorry for my english. I hope you can understand what i want. This system something like the direct sales network system.
>
>
You can use a query.
SELECT introducer, COUNT(*) AS total ;
FROM mytable ;
GROUP BY introducer ;
ORDER BY total DESC
--sb--