Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Guest

Recommended Posts

Posted

Hi I get the following error on my site, i know this is a compatible problem, but all the threads i have read have told me that i need to change a paragragh of coding in the index.php file, but if you look at my index.php coding below you will see that the coding to replace is not in my index.php file.

I have tried just to add the coding, but this just appears on my index page when i open the site.

 

 

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 = '59'

 

[TEP STOP]

 

 

<?php

/*

$Id: index.php,v 1.1 2005/08/11 17:37:59 hpdl Exp $

 

E-Commerce Solutions

 

Copyright © 2005 www.flash-template-design.com

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html <?php echo HTML_PARAMS; ?>>

<head>

<META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT">

<META NAME="DISTRIBUTION" CONTENT="GLOBAL">

<META NAME="KEYWORDS" CONTENT="lingerie, sexy clothing, intimate apparel, body suits, leather, sex, adult, adult toys, adult clothing, Adorable Apparel">

<META NAME="DESCRIPTION" CONTENT="Bringing you some of the sexiest womens clothing available online.">

<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">

<META NAME="REVISIT-AFTER" CONTENT="1 DAYS">

<META NAME="RATING" CONTENT="GENERAL">

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<!--<link rel="stylesheet" type="text/css" href="stylesheet.css">-->

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<tr>

<td width="302" height="439" align="left" valign="top"><img src="images/main.jpg" width="302" height="439" alt=""></td>

<td width="410" height="439" bgcolor="#F5F5F5">

<table border="0" width="410" cellpadding="0" cellspacing="0" height="439">

<tr>

<td width="409" height="100%">

<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">

<tr>

<td width="100%" height="196" valign="top" >

<table border="0" width="100%" cellpadding="0" cellspacing="0" >

<tr>

<td width="289" height="196" align="center" valign="top" >

<table border="0" width="232" cellpadding="0" cellspacing="0" >

<tr>

<td height="38" valign="top" style="padding-top:20px;"><img src="images/welcome.jpg" width="232" height="24" alt="" /></td>

</tr>

<tr>

<td height="1" background="images/hpoint.gif"><img src="images/hpoint.gif" width="3" height="1"></td>

</tr>

<tr>

<td width="100%" align="left" style="padding-top:8px; padding-bottom:11px;">

<img src="images/str_head.gif" width="9" height="5" hspace="2" vspace="1"/><span class="crimson">Welcome to Adorable Apparel. THIS IS A TEST SITE</span><br>

I would like to welcome you to Adorable Apparel. A one stop shop for all you Lingerie needs. Click on Products above to see our full product range available to purchase today.

</td>

</tr>

<tr>

<td height="1" background="images/hpoint.gif"><img src="images/hpoint.gif" width="3" height="1"></td>

</tr>

<tr>

<td height="30" style="padding-top:6px; " align="left"><img src="images/point_crimson.gif" width="4" height="4" vspace="1" alt=""/> <a href="about_us.php" class="more">more</a> <img src="images/str_more.gif" width="6" height="5" alt="" vspace="1"/></td>

</tr>

</table>

</td>

<td width="92" height="196" style="padding-right:28px; "><img src="images/welcome_girl.jpg" width="92" height="196" alt="" /></td>

</tr>

<tr>

<td colspan="2" height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>

</tr>

<tr>

<td colspan="2" bgcolor="#F5F5F5" height="2"><img src="images/spacer.gif" width="1" height="1" alt=""></td>

</tr>

<tr>

<td colspan="2" height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>

</tr>

<tr>

<td colspan="2"><?php include(DIR_WS_MODULES . 'special_products.php'); ?></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

<td width="1" height="100%" background="images/vpoint.gif" valign="top"><img src="images/vpoint.gif" width="1" height="3"></td>

</tr>

</table>

</td>

</tr>

<tr>

<td width="100%" height="2" colspan="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1" alt=""></td>

</tr>

<tr>

<td width="302" height="168" valign="top"><?php include(DIR_WS_MODULES . 'new_products.php'); ?> </td>

<td width="410" height="168" bgcolor="#F5F5F5" valign="middle" align="left">

<table width="100%" height="162" border="0" cellpadding="0" cellspacing="6" bgcolor="#F5F5F5">

<tr>

<td rowspan="3" height="61" ><img src="images/girl_links.jpg" width="127" height="154" alt="" /></td>

<td><b>Special Events</b>, Apart from our normal product lines, we stock special lines for special annual events throughout the year:</td>

</tr>

<tr>

<td height="1" background="images/hpoint.gif" align="left"><img src="images/hpoint.gif" width="3" height="1" alt=""></td>

</tr>

<tr>

<td height="100">

<ul style="list-style-image:url(images/sign_link.jpg); margin-left:25px; ">

<li><a href="" class="crimson">Easter</a></li>

<li><a href="" class="crimson">Christmas</a></li>

<li><a href="" class="crimson">Halloween</a></li>

<li><a href="" class="crimson">St Patricks Day</a></li>

<li><a href="" class="crimson">Valentines Day</a></li></ul></td>

</tr>

</table>

</td>

</tr>

<tr>

<td width="100%" height="3" colspan="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1" alt=""></td>

</tr>

 

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

 

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Posted

alter table orders_status add public_flag int DEFAULT '1';

 

Save the above in a text file, then insert it to your database. it should work OK.

Regards

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted
alter table orders_status add public_flag int DEFAULT '1';

 

Save the above in a text file, then insert it to your database. it should work OK.

Regards

Nic

Did this but has no effect.

Posted
Thats because it was the wrong one!! Sorry

 

go here

 

http://www.oscommerce.com/community/contributions,4654

 

Regards

Nic

Hi

 

I alread know about this contrib.

 

as my original question states

 

Hi I get the following error on my site, i know this is a compatible problem, but all the threads i have read have told me that i need to change a paragragh of coding in the index.php file, but if you look at my index.php coding below you will see that the coding to replace is not in my index.php file.

I have tried just to add the coding, but this just appears on my index page when i open the site.

 

 

i cannot change or amend a code that is not in my index.php file.

 

my index.php file content is included in this post

Posted

I compared your index.php to a stock osc index.php. You are missing big blocks of code.

 

You may want to ask the people who made your template where they relocated it.

Posted
I compared your index.php to a stock osc index.php. You are missing big blocks of code.

 

You may want to ask the people who made your template where they relocated it.

asked for their assitance before coming to forum and their reply is

 

Tony,

 

Though we provide customized versions of osCommerce, we are not the ones who wrote the original program. If you need to patch the software you may want to go to http://oscommerce.com where you can find upgrades, documentation, and forums that should be of help.

 

 

Best Regards,

 

Patrick Giever

Flash-Template-Design.com

 

Ticket Details

===================

Ticket ID: LKO-150685

Department: Support

Priority: Emergency

Status: On Hold

Posted

Looking through your code, my guess is that someone cut and pasted the output of the actual PHP file (what you would see if you clicked view page source on your browser) and then copied that as your original file. however there are some php functions still in the code so that makes me think that they went in after doing that and replaced some of their own code with the actual includes.

 

your index.php is more modified than it is original.

 

the solution would be to download the original oscommerce files and replace the index.php (then you can apply the php 5 fix that was mentioned earlier)

 

also, you will run into a problem if you are using a template. (or if you are using a very old version of OS commerce)

 

if this is the case (templates) then the code that you need to replace in the advanced_search_result.php will not be there, instead you will be able to find this code in a similarly named file in the templates directory, here is the filepath: templates/content/advanced_search_result.tpl.php.

 

at least this is how it was for me, and mine works now.

 

of course, before you do anything, i would back up any file that your changing, just in case.

 

-Dallas

 

asked for their assitance before coming to forum and their reply is

 

Tony,

 

Though we provide customized versions of osCommerce, we are not the ones who wrote the original program. If you need to patch the software you may want to go to http://oscommerce.com where you can find upgrades, documentation, and forums that should be of help.

 

 

Best Regards,

 

Patrick Giever

Flash-Template-Design.com

 

Ticket Details

===================

Ticket ID: LKO-150685

Department: Support

Priority: Emergency

Status: On Hold

Posted
Looking through your code, my guess is that someone cut and pasted the output of the actual PHP file (what you would see if you clicked view page source on your browser) and then copied that as your original file. however there are some php functions still in the code so that makes me think that they went in after doing that and replaced some of their own code with the actual includes.

 

your index.php is more modified than it is original.

 

the solution would be to download the original oscommerce files and replace the index.php (then you can apply the php 5 fix that was mentioned earlier)

 

also, you will run into a problem if you are using a template. (or if you are using a very old version of OS commerce)

 

if this is the case (templates) then the code that you need to replace in the advanced_search_result.php will not be there, instead you will be able to find this code in a similarly named file in the templates directory, here is the filepath: templates/content/advanced_search_result.tpl.php.

 

at least this is how it was for me, and mine works now.

 

of course, before you do anything, i would back up any file that your changing, just in case.

 

-Dallas

This site script is a full site. This was amongst a whole set of osc templates etc i purchased, all other osc setups are OK, it just seems that the auther of this site scriot has made the index.php file like an html file where all the written text on the home page is written in the index.php file, so when i do replace this with an original osc index.php file i am presented with a blank page apart from the header. look at easyas-abc (dot)co(dot)uk and you will see what i mean

Archived

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

×
×
  • Create New...