Re: [andycal] Multiple Categories
Hi andycal,
Yes, this is certainly possible! I did this by adding a "category" field to my Products section. I set it to Field Type = "List", Display As = "pulldown (multi value)", List Options = "Get options from database (advanced)", Section Tablename = "category", Use this field for option values = "num", Use this field for option labels = "breadcrumb".
Then, in my category detail Viewer, I got a list of products which belong to the selected category with a where clause:
list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
'where' => "category LIKE '%\t{$categoryRecord['num']}\t%'",
));
Is this what you were after? Please let me know if you have any questions!
EDIT: changed to use simpler LIKE \t where clause instead of REGEXP [[:<:]]
All the best,
Chris