Some people say you should not use mysql_fetch_assoc
more than one time, why is that?
e.g.: I want to display two tables one with users who paid for membership, other with users who did not, so instead of querying database 2 times I query it one time and get $result
variable with both types of users then I run loop mysql_fetch_assoc
and see if list['membership'] = 'paid'
then echo ...
Second time I loop loop mysql_fetch_assoc
and see if list['membership'] = 'free'
then echo ...
What uses less resources considering I got about equal amount of users who registered and unregistered.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…