Stuck with displaying accessories
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
i m stuck with the limitation of my display query.
/* query to select all models from accessory table */
$qry_model="select * from product_table where status='Y'and category_id=4";
$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' and status='Y' and category_id=4";
because i will have to write
'$desc_model_all' '$desc_model_all' and so on....