The problem is that after you call explode on $category_id, $category_id becomes an array.
So your sql statement is invalid at category_id='$category_id'
You will need to make a for loop to append the string "and category_id = '$category_id" based on the size of the category_id array
Quote:
for($a=0;$a<count($category_id);$a++)
$category_sql .= "and category_id = $category_id[$a]";
$feature_sql="select * from shop where status='sale' ".$category_sql." and picture1!='' and (expire_date > '$datecheck') order by expire_date";
|
Something like the above. I haven't tested or anything.
To get results you will need to do a mysql_query on your $feature_sql
and print_r to display what is returned.
I hope this helps.
__________________
Please login or register to view this content. Registration is FREE
Free Pay Per Click for Webmasters
Last edited by sc_king; 05-22-2009 at 10:57 AM..
|