Load-This Posted February 15, 2007 Share Posted February 15, 2007 Hey All, In the products_new.php i have the following snippet of code: $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); I have modified my layout and need to display the products description. Could someone add some code to take the description out of the products_description table. Thanks Link to comment Share on other sites More sharing options...
Load-This Posted February 15, 2007 Author Share Posted February 15, 2007 Anyone? Link to comment Share on other sites More sharing options...
sopinon Posted February 15, 2007 Share Posted February 15, 2007 $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); add pd.products_description in the field listing... that's all... Link to comment Share on other sites More sharing options...
Load-This Posted February 15, 2007 Author Share Posted February 15, 2007 Thats what i thought aswell .... But when i put <?php echo products_description; ?> It doesnt show anything. Link to comment Share on other sites More sharing options...
sopinon Posted February 15, 2007 Share Posted February 15, 2007 Thats what i thought aswell .... But when i put <?php echo products_description; ?> It doesnt show anything. The results are in the array $products_new try: <?php echo $products_new['products_description']; ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.