Possible Duplicate:
PHP - Simple way to read single record from MySQL
I want to query multiple rows in mysql as variable. for example:
SELECT name, tid FROM term_data WHERE vid = 2
this is the result:
name | tid
-----|----
Jack | 55
Tony | 87
John | 32
then I want to use while:
while (...) {
print "My name is: $name and my ID is: $tid";
//name and tid should be printed from database.
}
I can query one row and put it in a while
but How is this possible?