$query = "SELECT services FROM businesses WHERE id = '".mysql_escape_string($_GET['id'])."'";
$result = mysql_query($query);
$business = mysql_fetch_array($result);
mysql_free_result($result);
Now from this result, I would like to pick up all the service names from a different table where the id is an integer
$query = "SELECT name AS servicename FROM service WHERE id IN (".mysql_escape_string($business[ 'servicenames' ]).")";
$result = mysql_query($query);
$services = mysql_fetch_array($result);
mysql_free_result($result);
This is not working in mysql
Thanks,
Anthony