<?PHP $sql = " SELECT DISTINCT JVPCX.`category_id`, JVP.`product_id`, JVP.`product_sku`, JVP.`product_s_desc` FROM `jos_vm_product_category_xref` JVPCX INNER JOIN `jos_vm_product` JVP ON JVPCX.`product_id` = JVP.`product_id` "; $res = mysql_query($sql); $list = array(); while ( $r = mysql_fetch_object( $res ) ) { if ( ! isset( $list[ $r->category_id ] ) ) { $list[ $r->category_id ] = array(); } $list[ $r->category_id ][ $r->product_id ] = array( 'SKU' => $r->product_sku, 'Description' => $r->product_s_desc, ); } print_r($list); var_dump($r); ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)