Hmm...you want to pull the contact numbers 1,2,3... out of one table/database, and then look up the events with those same numbers?
$db = mysql_select_db("contact");
$result = mysql_query("SELECT contact_id FROM contacts");
while($row = mysql_fetch_row($result))
{
$contact_array[] = $row[0];
}
$contact_string = implode(",",$contact_array);
$db = mysql_select_db("events");
$result = mysql_query("SELECT events FROM events WHERE events_id IN ($contact_string)");
while($row = mysql_fetch_row($result)
{
echo "Event: $row[0]";
}
Adapt to your needs, you might need to use $db in the mysql_query() to make the change take affect... 🙂
---John Holmes...