Some say you should not use mysql_fetch_assocmore than once, why?
For example: I want to display two tables with users who paid for membership, and the other with users who did not, so instead of querying the database 2 times, I query it once and get a variable $resultwith both types of users, then I run a loop mysql_fetch_assocand see if list['membership'] = 'paid', then the echo ...
The second half I loop the cycle mysql_fetch_assocand see if list['membership'] = 'free', then the echo ...
Which uses less resources, given that I received an equal number of users, registered and unregistered.
source
share