Re: [PHP] Array from database table

2004-11-14 Thread raditha dissanayake
Richard wrote: How do I get the data from a mysql database into and array that looks like this Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 ) by using mysql_fetch_row() or mysql_fetch_array() The table has three fields but I only need the data from one field. $query="SELECT ame

[PHP] Array from database table

2004-11-14 Thread Richard
How do I get the data from a mysql database into and array that looks like this Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 ) The table has three fields but I only need the data from one field. $query="SELECT amenityID FROM property_amenity where listingId = '$listingId'"; --