I'm trying to get data from a mysql database... but i only need results specified by an array... for example i have a database which is populated with member data: username, email etc... and another table where i store per member their contact list like... So im looking on a way to display member their contact list... im just not clear on whats the best way... any tips are welcome... for example
$result = mysql_query("select contact_id from member_contact_list");
$contacts = array();
while ($row = mysql_fetch_array($result)){
$c_array[] = $row[ 'username' ];
}
$c_array = implode( ',', $existing_users );
$sql = "SELECT * FROM members WHERE id="c_array[]"";
Its a little hard to explain... i hope someone gets what i mean haha
Thanks!