And, what do you mean "it didn't work properly"? Did it just spend all day chatting up the secretarial staff?
What's with $rs and $rs3? Why do you repeat echoing the same value ($num_colums1) $num_columns1 times? Why is the $rs3->MoveNext() method outside the loop, or do you only want to look at one record? Why don't you just use "select count(*) from member" and get the total record count directly?