Guest Posted February 21, 2007 Share Posted February 21, 2007 Hi there, Im not sure what ive done to make it give me this error.. I have changed the layout of my pages, but after doing so i get the following error when i click on a catagory link on the left hand side. 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' [TEP STOP] Im running the latest version of oscommerce with nothing else added on. Could someone help me with this please? Link to comment Share on other sites More sharing options...
Velveeta Posted February 21, 2007 Share Posted February 21, 2007 Hi there, Im not sure what ive done to make it give me this error.. I have changed the layout of my pages, but after doing so i get the following error when i click on a catagory link on the left hand side. Im running the latest version of oscommerce with nothing else added on. Could someone help me with this please? Try it this way: select count(p.products_id) as total from products_description pd, products p, products_to_categories p2c left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' You had your products_to_categories table listed right after the first left join and before the second, though it wasn't a left join itself, it's an inner join using the where clause at the end... Sometimes sql syntax can be quirky like that... The only thing I did above is move the products_to_categories entry up to the first line, following products p, and before the first left join... See if that makes it work better... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 Thank you very much. Where would i make these changes? Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 Im running the latest version of oscommerce with nothing else added on. Could someone help me with this please? Doesn't look like it. Because the query does not match with the one in osc. Did you install the latest osc and then a template at the top? in which case you overided the latest osc files. In such cases you need to do manual integration. Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 ahh yes good point, sorry i thought a template wouldnt have made much difference. (not really used to osc) does that mean i cant use what velveeta replied? thanks Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 Ok since you install the template, you need to download the latest osc and then go through each change in the documentation (manual install in other words). Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 do i need to do that or do you think what velveeta mentioned might work and save me a shed load of time? If you have any idea what file that code belongs to, i can at least try before starting from scratch Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 If you have any idea what file that code belongs to, i can at least try before starting from scratch Yes I know exactly where the code belongs to, but trust me you don't want to do a little patch to one file. Use the manual instructions from the latest osc. Link to comment Share on other sites More sharing options...
Velveeta Posted February 21, 2007 Share Posted February 21, 2007 Yes I know exactly where the code belongs to, but trust me you don't want to do a little patch to one file. Use the manual instructions from the latest osc. Yeah, engima's right, if you just do that 1 patch, there may be other problems that pop up... Rather than hunting them down 1 at a time, or even worse, not noticing they're there since they don't output an error message, you'll want to do a manual install for the common files... Just use a program like winmerge or something to find all of the changes... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2007 Share Posted February 21, 2007 ok, many thanks guys :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.