This is a discussion on Need Some help. within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hello, I have installed AABox.com osCMax V1.5.5. Everything is working fine but i get the following error when ever i ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hello, I have installed AABox.com osCMax V1.5.5. Everything is working fine but i get the following error when ever i try to access Specials under Catalog in Admin section. Code: Specials Products Products Price Status Action 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1 select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from products p, specials s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -10, 10 [TEP STOP] Thanks. |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| Quote:
Code: $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id order by pd.products_name";
$specials_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $specials_query_raw, $specials_query_numrows);
$specials_query = tep_db_query($specials_query_raw);
while ($specials = tep_db_fetch_array($specials_query)) {
if ((!isset($HTTP_GET_VARS['sID']) || (isset($HTTP_GET_VARS['sID']) && ($HTTP_GET_VARS['sID'] == $specials['specials_id']))) && !isset($sInfo)) {
$products_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$specials['products_id'] . "'");
$products = tep_db_fetch_array($products_query);
$sInfo_array = array_merge($specials, $products);
$sInfo = new objectInfo($sInfo_array);
}
|
|
#3
| |||
| |||
| It looks like the includes/classes/split_page_results.php bug (old osC bug, but it only shows combined with newer MySQL versions) try: change: Code: $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));
$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
Code: $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));
if($offset <0 ) $offset = 0;
$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
|
| The Following User Says Thank You to paulM For This Useful Post: | ||
daffodil (05-20-2007) | ||
| Sponsored Links | ||
| ||
| |