snubbr.com

I'm cleaning out a pc to sell to someone...what is verisign.com?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
First question I have is I'm cleaning out a pc to sell to someone...what is verisign.com? Thanks in advance for any answer. My 2nd question... Hi Dudes and Dudettes,.

I have recently fixed the SQL 1054 error. After this all was fine. However after adding more products I have now discovereda new error.

When you click on a catagory, or a sub catagory if there is any of these in a given catagory, then I get the error below. However product listing is fine in all other cases......

It has been suggested that my problem lies here.

Note the 1 (, yet 2), but this was part of the fix for the 1054 error.....

Any feedback would be highly appreciated as hopefully this is the last fix for this Verisign site (before I break it again)..

Comments (7)

Hmm... I need to find out myself. I don't know what is the right answer. I'll do some poking around and get back to you if I find an decent answer. You should email the people at Verisign as they probably could help you..

Comment #1

All sorted.

When I had made the changes for my SQL 5 error 1054 I had not made all 4 required changes to index.php.

I re-applied the changed and now working..

Comment #2

HI Ricardo, I have the same problem with the 1064 SQL Error. Could you tell me how you solved it?.

Thanks a lot..

Daniel..

Comment #3

Well if it's the same problem then yeah sure can.

The error will mention 2 file names, the second being sessions. Whatever the first ones is open the file in an editor and simply put the cursor as far down on the page as you can. If the error is the same then you should see that after the ?> at the bottom there is a form of space (i.e literally as if you have pressed spacebar or return after it) Simply delete this space so that the cursor is immediatley after the ?>.

Save the changes. Now with mine it did not fix straight away but did indeed change the error in the sense that the 1st filename. If this is the case open the file that is now mentioned and repeat....and keep doing this until error dissapears.....

I know it sounds strange but it works..

Comment #4

Hi Ricardo, I tried with your suggestion, but I couldn't solve the problem. May be I'm doing something wrong..

This is the message I receive:.

"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 '' at line 1.

SELECT `manufacturers_name` FROM `manufacturers` WHERE manufacturers_id =.

[TEP STOP]".

I've done the changes to the "manufacturers.php" file. Is it OK?..

Thanks again and have a good day!..

Comment #5

This is a different issue than mine now, and I would not want to give you false advice (not too great at this still learnin myself), however there are many other threads on here where more copitant people have had input..

I know the forum search is not great but I did the following search in google and got plenty of results.

Site:oscommerce.com 1064 - You have an error in your SQL syntax;.

Hope this helps and sorry I could not help resolve for you..

Comment #6

Hi,.

I`ve got the following problem when I enter some keywords in the search field..

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 'from products p left join manufacturers m using(manufacturers_id) left join spec' at line 1.

From products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '2' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%blume%' or p.products_model like '%blume%' or m.manufacturers_name like '%blume%') ) order by pd.products_name limit 0, 20.

[TEP STOP].

What does it mean? Please write it down for dummies.

I`m not too deep into SQL..

Thank you for your attention!..

Comment #7

Hi,.

Here is the code which causes the problems..

Maybe this helps a little....

<?php.

/*.

$Id: advanced_search_result.php 1739 2007-12-20 00:52:16Z hpdl $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2003 osCommerce.

Released under the GNU General Public License.

*/.

Require('includes/application_top.php');.

Require(DIR_WS_LANGUAGES$language'/'FILENAME_ADVANCED_SEARCH);.

$error = false;.

If ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) &&.

(isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) &&.

(isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) &&.

(isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) &&.

(isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) ) {.

$error = true;.

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);.

} else {.

$dfrom = '';.

$dto = '';.

$pfrom = '';.

$pto = '';.

$keywords = '';.

If (isset($HTTP_GET_VARS['dfrom'])) {.

$dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']);.

}.

If (isset($HTTP_GET_VARS['dto'])) {.

$dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']);.

}.

If (isset($HTTP_GET_VARS['pfrom'])) {.

$pfrom = $HTTP_GET_VARS['pfrom'];.

}.

If (isset($HTTP_GET_VARS['pto'])) {.

$pto = $HTTP_GET_VARS['pto'];.

}.

If (isset($HTTP_GET_VARS['keywords'])) {.

$keywords = $HTTP_GET_VARS['keywords'];.

}.

$date_check_error = false;.

If (tep_not_null($dfrom)) {.

If (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) {.

$error = true;.

$date_check_error = true;.

$messageStack->add_session('search', ERROR_INVALID_FROM_DATE);.

}.

}.

If (tep_not_null($dto)) {.

If (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) {.

$error = true;.

$date_check_error = true;.

$messageStack->add_session('search', ERROR_INVALID_TO_DATE);.

}.

}.

If (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) {.

If (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) {.

$error = true;.

$messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE);.

}.

}.

$price_check_error = false;.

If (tep_not_null($pfrom)) {.

If (!settype($pfrom, 'double')) {.

$error = true;.

$price_check_error = true;.

$messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM);.

}.

}.

If (tep_not_null($pto)) {.

If (!settype($pto, 'double')) {.

$error = true;.

$price_check_error = true;.

$messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM);.

}.

}.

If (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {.

If ($pfrom >= $pto) {.

$error = true;.

$messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);.

}.

}.

If (tep_not_null($keywords)) {.

If (!tep_parse_search_string($keywords, $search_keywords)) {.

$error = true;.

$messageStack->add_session('search', ERROR_INVALID_KEYWORDS);.

}.

}.

}.

If (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) {.

$error = true;.

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);.

}.

If ($error == true) {.

Tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false));.

}.

// Show Product If Only Result Mod.

// create column list.

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,.

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,.

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,.

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,.

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,.

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,.

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,.

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);.

Asort($define_list);.

$column_list = array();.

Reset($define_list);.

While (list($key, $value) = each($define_list)) {.

If ($value > 0) $column_list[] = $key;.

}.

$select_column_list = '';.

For ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

Switch ($column_list[$i]) {.

Case 'PRODUCT_LIST_MODEL':.

$select_column_list .= 'p.products_model, ';.

Break;.

Case 'PRODUCT_LIST_MANUFACTURER':.

$select_column_list .= 'm.manufacturers_name, ';.

Break;.

Case 'PRODUCT_LIST_QUANTITY':.

$select_column_list .= 'p.products_quantity, ';.

Break;.

Case 'PRODUCT_LIST_IMAGE':.

$select_column_list .= 'p.products_image, ';.

Break;.

Case 'PRODUCT_LIST_WEIGHT':.

$select_column_list .= 'p.products_weight, ';.

Break;.

}.

}.

/** show-soldout-v1.0 **/.

If(strpos($select_column_list, "p.products_quantity")==false).

$select_column_list .= 'p.products_quantity, ';.

$select_column_list .= 'p.products_status, ';.

/** end show-soldout-v1.0 **/.

If ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {.

$select_str .= ", SUM(tr.tax_rate) as tax_rate ";.

}.

$from_str = "from "TABLE_PRODUCTS" p left join "TABLE_MANUFACTURERS" m using(manufacturers_id) left join "TABLE_SPECIALS" s on p.products_id = s.products_id";.

If ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {.

If (!tep_session_is_registered('customer_country_id')) {.

$customer_country_id = STORE_COUNTRY;.

$customer_zone_id = STORE_ZONE;.

}.

$from_str .= " left join "TABLE_TAX_RATES" tr on p.products_tax_class_id = tr.tax_class_id left join "TABLE_ZONES_TO_GEO_ZONES" gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '"(int)$customer_country_id"') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '"(int)$customer_zone_id"')";.

}.

$from_str .= ", "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_CATEGORIES" c, "TABLE_PRODUCTS_TO_CATEGORIES" p2c";.

/** original **///$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '"(int)$languages_id"' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";.

/** show-soldout-v1.0 **/ $where_str = " where p.products_id = pd.products_id and pd.language_id = '"(int)$languages_id"' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";.

If (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) {.

If (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) {.

$subcategories_array = array();.

Tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']);.

$where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '"(int)$HTTP_GET_VARS['categories_id']"'";.

For ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {.

$where_str .= " or p2c.categories_id = '"(int)$subcategories_array[$i]"'";.

}.

$where_str .= ")";.

} else {.

$where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$HTTP_GET_VARS['categories_id']"'";.

}.

}.

If (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {.

$where_str .= " and m.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'";.

}.

If (isset($search_keywords) && (sizeof($search_keywords) > 0)) {.

$where_str .= " and (";.

For ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {.

Switch ($search_keywords[$i]) {.

Case '(':.

Case ')':.

Case 'and':.

Case 'or':.

$where_str .= " "$search_keywords[$i]" ";.

Break;.

Default:.

$keyword = tep_db_prepare_input($search_keywords[$i]);.

$where_str .= "(pd.products_name like '%"tep_db_input($keyword)"%' or p.products_model like '%"tep_db_input($keyword)"%' or m.manufacturers_name like '%"tep_db_input($keyword)"%'";.

If (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%"tep_db_input($keyword)"%'";.

$where_str .= ')';.

Break;.

}.

}.

$where_str .= " )";.

}.

If (tep_not_null($dfrom)) {.

$where_str .= " and p.products_date_added >= '"tep_date_raw($dfrom)"'";.

}.

If (tep_not_null($dto)) {.

$where_str .= " and p.products_date_added <= '"tep_date_raw($dto)"'";.

}.

If (tep_not_null($pfrom)) {.

If ($currencies->is_set($currency)) {.

$rate = $currencies->get_value($currency);.

$pfrom = $pfrom / $rate;.

}.

}.

If (tep_not_null($pto)) {.

If (isset($rate)) {.

$pto = $pto / $rate;.

}.

}.

If (DISPLAY_PRICE_WITH_TAX == 'true') {.

If ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= "(double)$pfrom")";.

If ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= "(double)$pto")";.

} else {.

If ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= "(double)$pfrom")";.

If ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= "(double)$pto")";.

}.

If ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {.

$where_str .= " group by p.products_id, tr.tax_priority";.

}.

If ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {.

For ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

If ($column_list[$i] == 'PRODUCT_LIST_NAME') {.

$HTTP_GET_VARS['sort'] = $i+1'a';.

$order_str = ' order by pd.products_name';.

Break;.

}.

}.

} else {.

$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);.

$sort_order = substr($HTTP_GET_VARS['sort'], 1);.

$order_str = ' order by ';.

Switch ($column_list[$sort_col-1]) {.

Case 'PRODUCT_LIST_MODEL':.

$order_str .= "p.products_model "($sort_order == 'd' ? "desc" : "")", pd.products_name";.

Break;.

Case 'PRODUCT_LIST_NAME':.

$order_str .= "pd.products_name "($sort_order == 'd' ? "desc" : "");.

Break;.

Case 'PRODUCT_LIST_MANUFACTURER':.

$order_str .= "m.manufacturers_name "($sort_order == 'd' ? "desc" : "")", pd.products_name";.

Break;.

Case 'PRODUCT_LIST_QUANTITY':.

$order_str .= "p.products_quantity "($sort_order == 'd' ? "desc" : "")", pd.products_name";.

Break;.

Case 'PRODUCT_LIST_IMAGE':.

$order_str .= "pd.products_name";.

Break;.

Case 'PRODUCT_LIST_WEIGHT':.

$order_str .= "p.products_weight "($sort_order == 'd' ? "desc" : "")", pd.products_name";.

Break;.

Case 'PRODUCT_LIST_PRICE':.

$order_str .= "final_price "($sort_order == 'd' ? "desc" : "")", pd.products_name";.

Break;.

}.

}.

$listing_sql = $select_str$from_str$where_str$order_str;.

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');.

If($listing_split->number_of_rows == 1) {.

$product_query = tep_db_query($listing_split->sql_query);.

$product = tep_db_fetch_array($product_query);.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$product['products_id']));.

}.

// Show Product If Only Result Mod.

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH));.

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false));.

?>.

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">.

<html <?php echo HTML_PARAMS; ?>>.

<head>.

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">.

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)DIR_WS_CATALOG; ?>">.

<title><?php echo TITLE; ?></title>.

<link rel="stylesheet" type="text/css" href="stylesheet.css">.

<?php include(DIR_WS_MODULESFILENAME_COOLIRIS_HEADER); ?>.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">.

<! header //>.

<?php require(DIR_WS_INCLUDES'header.php'); ?>.

<! header_eof //>.

<! body //>.

<table border="0" width="100%" cellspacing="3" cellpadding="3">.

<tr>.

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

<?php require(DIR_WS_INCLUDES'column_left.php'); ?>.

<! left_navigation_eof //>.

</table></td>.

<! body_text //>.

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td class="pageHeading"><?php echo HEADING_TITLE_2; ?></td>.

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES'table_background_browse.gif', HEADING_TITLE_2, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

</tr>.

</table></td>.

</tr>.

<tr>.

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

</tr>.

<tr>.

<td>.

<?php.

/*.

Show Product If Only Result Mod, code block moved.

// create column list.

...

$listing_sql = $select_str$from_str$where_str$order_str;.

*/.

Require(DIR_WS_MODULESFILENAME_PRODUCT_LISTING);.

?>.

</td>.

</tr>.

<tr>.

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

</tr>.

<tr>.

<td class="main"><?php echo '<a href="'tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false)'">'tep_image_button('button_back.gif', IMAGE_BUTTON_BACK)'</a>'; ?></td>.

</tr>.

</table></td>.

<! body_text_eof //>.

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! right_navigation //>.

<?php require(DIR_WS_INCLUDES'column_right.php'); ?>.

<! right_navigation_eof //>.

</table></td>.

</tr>.

</table>.

<! body_eof //>.

<! footer //>.

<?php require(DIR_WS_INCLUDES'footer.php'); ?>.

<! footer_eof //>.

<br>.

</body>.

</html>.

<?php require(DIR_WS_INCLUDES'application_bottom.php'); ?>.

Greetings!..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.