Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in advanced_search.php


jonsa79

Recommended Posts

Posted

I get this error when I enter advanced_search.php:

 

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 'and cd.language_id = '1' order by sort_order, cd.categories_name' at line 1

select c.categories_id, cd.categories_name from categories c, categories_description cd where parent_id = '0' and c.categories_id = cd.categories_id and and cd.language_id = '1' order by sort_order, cd.categories_name

[TEP STOP]

 

Any OsC-pro know what I have done wrong?

 

Thanks,

jonsa

Posted

you have and and instead of a singular and

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Thanks Steve!

 

Where do I change this? I've looked in both advanced_search.php and advanced_search_results.php, and couldn't find it.

 

Is it in the database?

 

Thanks.

Posted

You must have installed a contribution which has altered your catalog/includes/functions/general.php

 

function tep_get_categories

 

at the categories query, below is an original

 

	$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

 

Yours will have this

 

	$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...