Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Featured Products MySQL error


navyhost

Recommended Posts

Posted

Hi guys,

 

I had a mod made for featured products and it was working on one of our sites but not the other (different servers)

 

Here is the error we are getting:

 

1054 - Unknown column 's.cat_id' in 'on clause'

select count(*) as total from products p, featured s, products_description pd left join fcat f on f.id = s.cat_id where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id

[TEP STOP]

 

This is the section where the code is being generated from:

<?php
$featured_query_raw = "select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status, f.title as cat from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_FCAT . " f on f.id = s.cat_id where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = s.products_id order by pd.products_name";
$featured_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $featured_query_raw, $featured_query_numrows);
$featured_query = tep_db_query($featured_query_raw);
while ($featured = tep_db_fetch_array($featured_query)) {
  if ( ((!$HTTP_GET_VARS['sID']) || ($HTTP_GET_VARS['sID'] == $featured['featured_id'])) && (!$sInfo) ) {

 

Any assistance in fixing this is greatly appreciated.

 

thanks

Sincerely

Mike

Posted

1054 - Unknown column 's.cat_id' in 'on clause'

 

select count(*) as total from products p, featured s, products_description pd left join fcat f on f.id = s.cat_id where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id

 

A field is missing in the db you are querying.

 

s.cat_is

 

Look for the letter s and you see featured s

 

so the table is called featured.

 

I would say the db on this second server has not been updated for some new fields or more likly the entire table does not exist.

 

s is featured

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
1054 - Unknown column 's.cat_id' in 'on clause'

 

select count(*) as total from products p, featured s, products_description pd left join fcat f on f.id = s.cat_id where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id

 

A field is missing in the db you are querying.

 

s.cat_is

 

Look for the letter s and you see featured s

 

so the table is called featured.

 

I would say the db on this second server has not been updated for some new fields or more likly the entire table does not exist.

 

s is featured

Hey Geoffrey

 

Thank you for the input, I checked it out and it appeared all the fields were there. I decided to alter the left join comment and it appeared to work.

Sincerely

Mike

Archived

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

×
×
  • Create New...