hi all

There is field name "model" for all products in products table.

there is one category "ACCESSORIES" in which "model" field has values like "e71,e72,e73,e74....." all together in one field, because some accessories are compatible with many phones.

when e71 phone is displayed on the page, then i want to display accessories whose "model" field has values e71.

here is what i have tried

PHP Code:

/* query to select all models from accessory table */

$qry_model="select * from product_table where status='Y'and category_id=4";
$qry_model_result=mysql_query($qry_model);
while(
$qry_model_row=mysql_fetch_array($qry_model_result))
{
$desc_model_all $qry_model_row['model'];
$desc_model_all explode(','$desc_model_all); 
}

/* query to display accessories  */

$qryc="select * from product_table where model LIKE '$desc_model_all[0]' and status='Y' and category_id=4"
i m stuck with the limitation of my display query.

because i will have to write
PHP Code:
'$desc_model_all[0]' '$desc_model_all[1]' and so on.... 
vineet