I'm getting the results of an array using this
$arrayResults = $_GET;
$arr = $arrayResults;
and am then using this to get the variables:
foreach ($arr['seller'] as $seller) {
echo $seller;
}
which out puts value 1 value 2 value 3 but when I put that into a MySQL query it doesn't work so I need to get them into a string and ideally have something like this - "value 1" OR "value 2" OR "value 3"
This is the query I'm using
$sql_select = "SELECT * ";
$sql_from = "from feeds,product_categories_map where feeds.seller =".dbstr( $seller )." and feeds.enabled=1 and feeds.stock=1 and feeds.deleted=0 and feeds.best_seller=1 and product_id=product_feed_id and product_feed_id!=1 ";
$sql_orderby = " ORDER BY rand()";
$sql_limit = " LIMIT 20";
$query=$sql_select . $sql_from . $sql_group . $sql_orderby . $sql_limit;
$product_results=dbselect( $query,"dbLinkInt" );
I'm not sure where I'm going wrong here.