Page 1 of 1

Making a database row an array with a condition

Posted: Sat Jul 23, 2005 2:55 am
by mickd
hi, im having another slight problem which i cant seem to notice a way to work. any help appriciated :)

i was wondering how you would make a variable from a row in a mysql table like the example below:

Table

Row1, Row2, Row3
name1, lastname1, 1
name2, lastname2, 0
name3, lastname3, 1
name4, lastname4, 1
name5, lastname5, 0
name6, lastname6, 1

is it possible to make an array that goes in array(name1, name3, name4, name6)? where all of them have 1 in row3.

thanks for any replys in advanced!

Posted: Sat Jul 23, 2005 8:44 am
by shiznatix
look at mysql_fetch_assoc and mysql_fetch_row