Lets say I want to send an email to the people who like big sized candy.
When I do this:
$query1 = mysql_query("SELECT id_candy FROM `candylist` WHERE
candysize > 100") or die(mysql_error());
$result = mysql_fetch_array( $query1 );
$query2 = mysql_query("SELECT mail FROM `buyers` WHERE
candysizeinterest IN ($result)
") or die(mysql_error());
This query2 is of course the issue.
$result is not in a proper format to be used and then I get the obvious error of:
**Unknown column 'Array' in 'where clause'**
I need help to format the results of the query in a way that it looks like:
($val1, $val2, $val3....and so on)
Then I will be able to use it for an IN statement.
But I just do not know how to do so.