Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Advanced Search


Manoil

Recommended Posts

Posted

Hey guys, I need to put some product attributes in my product search. For example I have product ''A'' which has attribute ''1'' and I need in the search bar to choose this attribute ''1''... I hope you got my idea :blush: Thanks in advance for the help!

 

Manoil

Posted

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c,products_attributes pa where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id

 

[TEP STOP]

 

 

that happened when I updated these files... (think)

 

 

PS

 

Thanks for the fast reply IVUM :)

Posted
1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c,products_attributes pa where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id

 

[TEP STOP]

that happened when I updated these files... (think)

PS

 

Thanks for the fast reply IVUM :)

 

I have the same error with mysql5

Posted

This is a known issue with PHP5 and as far as am aware there is currently no fix, I have search all over this forum when I had this issue last week!

Posted

That doesn't resolve this problem if I remember correctly, if someone could confirm it would be appreciated.

Posted
That doesn't resolve this problem if I remember correctly, if someone could confirm it would be appreciated.

 

i tested it before i posted yesterday. i took the sql from manoil's post and it failed. then i added the parenthesis as directed in the contribution and it worked.

 

the contribution mentions two places in the code to make similar changes...there may be more (not to mention from other contributions) but it seemed to do the trick in my test.

 

have you tried this yourself and if so, what error (if any) did you get?

Posted

Am sorry, I thought we were referring to the error that I seem to get on the advanced search page and not the result page, the one I get on the advanced search page is below, this only happens with PHP5 and there doesn't seem to be a fix unless I am mistaken?

 

1054 - Unknown column 'pv.products_options_values_id' in 'on clause'

 

select pv.products_options_values_id as id, pv.products_options_values_name as text from products_options_values pv, products_options po join products_options_values_to_products_options popv on (pv.products_options_values_id = popv.products_options_values_id) where popv.products_options_id = po.products_options_id and popv.products_options_id =1 and po.language_id =1 group by pv.products_options_values_id, products_options_values_name

 

[TEP STOP]

Posted
Am sorry, I thought we were referring to the error that I seem to get on the advanced search page and not the result page, the one I get on the advanced search page is below, this only happens with PHP5 and there doesn't seem to be a fix unless I am mistaken?

 

well, the fix that i referred to was a simple matter of adding a couple sets of parenthesis. i bet if you add the parenthesis in similar places in this statement that will fix the problem. i don't have the code on this computer that i'm on right now so i can't test it. maybe you can give it a shot? :)

  • 4 weeks later...
Posted

Try replacing line 238 with:

$option_values_query = tep_db_query('select pv.products_options_values_id as id, pv.products_options_values_name as text from ('. TABLE_PRODUCTS_OPTIONS_VALUES . ' pv, '. TABLE_PRODUCTS_OPTIONS .' po) join ' . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . ' popv on (pv.products_options_values_id = popv.products_options_values_id) where popv.products_options_id = po.products_options_id and popv.products_options_id =' . $attributes['products_options_id'] . ' and pv.language_id ='. (int)$languages_id . ' group by pv.products_options_values_id, products_options_values_name ORDER BY products_options_values_name ASC');

Archived

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

×
×
  • Create New...