osCmax v2.5 User Manual
Results 1 to 2 of 2

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

This is a discussion on Another 1054 - Unknown column 'p.products_id' in 'on clause' Error within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; Hi all Running Oscmax v2.0 RC3 and my host decided to upgrade to MySQL5 without warning! As a result I ...

      
  1. #1
    Lurker
    Join Date
    Aug 2008
    Posts
    2
    Rep Power
    0


    Default Another 1054 - Unknown column 'p.products_id' in 'on clause' Error

    Hi all

    Running Oscmax v2.0 RC3 and my host decided to upgrade to MySQL5 without warning!

    As a result I have problems with the search function on my site. The error message I get is:

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

    select count(distinct p.products_id) as total from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id) left join manufacturers m on m.manufacturers_id=p.manufacturers_id, products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_extra_fields pef 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 and ((pd.products_name like '%grey%' or p.products_model like '%grey%' or m.manufacturers_name like '%grey%' or p2pef.products_extra_fields_value like '%grey%') ) and find_in_set('0', products_hide_from_groups) = 0 and find_in_set('0', categories_hide_from_groups) = 0


    I have tried every fix I can find but nothing seems to work - the files I worked on were index.php and advanced_search_result.tpl.php

    I also have the products extra fields contribution installed.

    There was a problem with the articles but I managed to fix that with no problems.

    Can anyone help as this is driving me nuts!

    Thanks!

  2. #2
    Lurker
    Join Date
    Aug 2008
    Posts
    2
    Rep Power
    0


    Default Re: Another 1054 - Unknown column 'p.products_id' in 'on clause' Error

    Don't worry - fixed it myself.

    It was in the advanced_search_result.tpl.php round line 132 in my version. Here is what I did in case anyone else has this problem:

    $from_str = "from (((" . TABLE_PRODUCTS . " p) left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m on m.manufacturers_id=p.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

Similar Threads

  1. Error Message - 1054 - Unknown column 'p.products_id' in 'on clause'
    By michael_s in forum New osCommerce Contributions
    Replies: 2
    Last Post: 04-24-2009, 06:58 PM
  2. Error Message - 1054 - Unknown column 'p.products_id' in 'on clause'
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 07-30-2008, 09:50 PM
  3. Error Message - 1054 - Unknown column 'p.products_id' in 'on clause'
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-24-2007, 10:35 PM
  4. 1054 - Unknown column 'p.products_id' in 'on clause'
    By starview in forum osCommerce 2.2 Discussion
    Replies: 1
    Last Post: 08-16-2007, 05:44 AM
  5. Error Message - 1054 - Unknown column 'p.products_id' in 'on clause'
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-27-2007, 02:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •