Hi there,
I have a site that has several different pages which display products from each category on the designated page.
What I am looking to do is create one page that also lists ALL the products.
Right now, in the category specific page it has this is in the code:
$data = get_portfolio_industry('Building Products');
$offset = $_GET['offset'];
if($offset == ''){
$offset = 0;
}
function get_industries($rec_id){
$sql = "SELECT * FROM `".TBL_PORTFOLIO_INDUSTRY."` WHERE `portfolio_id` = '$rec_id'";
$data = SelectMultiRecords($sql);
return $data;
}
And this is the from the functions file:
function get_portfolio_industry($industry){
$sql = "SELECT * FROM `".TBL_PORTFOLIO."` WHERE id IN (SELECT `portfolio_id` FROM `".TBL_PORTFOLIO_INDUSTRY."` WHERE `industry` = '$industry') ORDER BY `id`";
$data=SelectMultiRecords($sql);
return $data;
}
My hope was I would simple combine the products like this:
$data = get_portfolio_industry('Building Products,Building Services,General Products');
...but unfortunately it doesn't combine them. Any thoughts? Any help would be much appreciated.