This is a discussion on Happy Hours Specials Basic within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Hello! Bug fix in db query Please replace in (catalog)/includes/boxes/happy_hours_specials_basic.php line 20: if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| Hello! Bug fix in db query Please replace in (catalog)/includes/boxes/happy_hours_specials_basic.php line 20: if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, hhs.specials_price_happy_hours, hhs.status_happy_hours, hhs.happy_hours_beginning_date, hhs.happy_hours_end_date, hhs.happy_hours_beginning_time, hhs.happy_hours_end_time, hhs.specials_date_added from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_HAPPY_HOURS_SPECIALS_BASIC . " hhs where p.products_status = '1' and p.products_id = hhs.products_id and pd.products_id = hhs.products_id and pd.language_id = '" . (int)$languages_id . "' and hhs.status_happy_hours = '1' and '" . $uhrzeit . "' BETWEEN hhs.happy_hours_beginning_time and hhs.happy_hours_end_time and now() > hhs.happy_hours_beginning_date and now() < hhs.happy_hours_end_date order by hhs.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) { on good code: if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, hhs.specials_price_happy_hours, hhs.status_happy_hours, hhs.happy_hours_beginning_date, hhs.happy_hours_end_date, hhs.happy_hours_beginning_time, hhs.happy_hours_end_time, hhs.specials_date_added from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_HAPPY_HOURS_SPECIALS_BASIC . " hhs where p.products_status = '1' and p.products_id = hhs.products_id and pd.products_id = hhs.products_id and pd.language_id = '" . (int)$languages_id . "' and hhs.status_happy_hours = '1' and '" . $time . "' BETWEEN hhs.happy_hours_beginning_time and hhs.happy_hours_end_time and hhs.happy_hours_beginning_date
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Database corruption 5/6/07 lost several hours of posts | michael_s | Announcement Discussions | 0 | 05-06-2007 08:36 PM |
| 600 members in the last 24 hours and no introductions? | michael_s | Off topic & Chit Chat | 0 | 01-17-2007 07:30 AM |
| Mdb -> Insert Query -> mySQL -> I Happy ! | damnedpig | osCMax v1.7 Discussion | 1 | 07-29-2004 09:11 AM |