Hi im totally stuck, could someone help me out?
I have done a straight forward MySQL query from a database to return all products.
I have used the productGroupDesc to tell me which company and category they belong to. A typical entry looks like
Company - Category
So what im trying to do is categorise the products by first finding which company it belongs to and then the category. Then simply list them.
Any ideas?
This is what i have so far:
global $__CMS_CONN__;
$sql = 'SELECT name FROM isproducts';
$arr = array();
$stmt = $__CMS_CONN__->prepare($sql);
$stmt->execute();
$listOfProducts = array();
while ( $row = $stmt->fetchObject() )
{
$row->prodGroupDescList = explode(' - ', $row->ProductGroupDescription);
$listOfProducts[] = $row;
}
So from here i need help in creating the lists based on what they have in their productGroupDesc. Hope that makes sense to someone!