Digerdoo Posted April 29, 2008 Posted April 29, 2008 Error message here: 1054 - Unknown column 'p.products_id' in 'on clause' select substring(pd.products_description, 1, 300) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from products p, products_description pd, SONY01 sp left join specials s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '4' [TEP STOP] And code here: <?php function tep_ACER01_with_attributes($products_id) { $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'"); $attributes = tep_db_fetch_array($attributes_query); if ($attributes['count'] > 0) { return true; } else { return false; } } $star_products_query = tep_db_query("select substring(pd.products_description, 1, 240) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_ACER01 . " sp left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'"); $star_products = tep_db_fetch_array($star_products_query); $star_products['products_name'] = tep_get_products_name($star_products['products_id']); $evita_cortar_palabras = explode( ' ', $star_products["products_description"] ); array_pop( $evita_cortar_palabras ); $star_products["products_description"] = implode( ' ', $evita_cortar_palabras ); if (!tep_ACER01_with_attributes($star_products['products_id'])) { $star_products["0"] = array('align' => 'center', 'params' => 'width="100%" height="100%" valign="top"', 'text' => ' <table border=0 WIDTH="100%"> <tr> <td align="center" valign="top"> <a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 0,200) . '</a> </td> </tr> <tr> <td width="100%" nowrap class="star-product-title01">' . $star_products['products_name'] . '<br></td> </tr> <td width="350" height="100" ALIGN=left VALIGN=TOP nowrap class="star-product01">'. $star_products["products_description"] . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a> </td> </td> <tr> <td ALIGN=center VALIGN=TOP class="star-product-price01"> '.$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' <br> </td> </tr> <tr> <td align=center valign=top> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif',IMAGE_BUTTON_MOREINFO) . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_KIRJAUDU, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a> </td> </tr> </table> <br> '); new contentBox($star_products); } ?> :'(
FIMBLE Posted April 29, 2008 Posted April 29, 2008 p.products are not default tables, there must be an error with a contribution you have added. perhaps its called star products? Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
♥toyicebear Posted April 29, 2008 Posted April 29, 2008 Error message here: 1054 - Unknown column 'p.products_id' in 'on clause' You need to update the contributions mysql query to be mysql5 compatible. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here]
FIMBLE Posted April 29, 2008 Posted April 29, 2008 Think you should be looking here, there are lots of updates for it http://addons.oscommerce.com/info/2255 Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Digerdoo Posted April 29, 2008 Author Posted April 29, 2008 You need to update the contributions mysql query to be mysql5 compatible. Yes i have update mysql query to be mysql5 compatible but how i update this star products ? What changes i must done in code..
Recommended Posts
Archived
This topic is now archived and is closed to further replies.