As an example I have four entries with two fields each.
Field1 | Field2
2 | 2
4 | 2
5 | 2
6 | 4
For every entry that equals 2 in field2, I want to output the numbers which are in field1.
So I want it to output (If the entry equals 2 in Field2):
$var[0] = 2
$var[1] = 4
$var[2] = 5
What MYSQL command would I use to obtain the information in this way?
Thanks,
-Phil