473,416 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

1054 - Unknown column 'p.products_id' in 'on clause' select p.products_image, pd.pro

tjc0ol
26
Hi guys,

I'm a newbie in php and I got error in my index.php which is:

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

select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 = '62' order by pd.products_name

[TEP STOP]

How can I resolved this? This is my code.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. /*
  3.   $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $
  4.  
  5.   osCommerce, Open Source E-Commerce Solutions
  6.   http://www.oscommerce.com
  7.  
  8.   Copyright (c) 2003 osCommerce
  9.  
  10.   Released under the GNU General Public License
  11. */
  12.  
  13.   require('includes/application_top.php');
  14.  
  15. // the following cPath references come from application_top.php
  16.   $category_depth = 'top';
  17.   if (isset($cPath) && tep_not_null($cPath)) {
  18.     $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  19.     $cateqories_products = tep_db_fetch_array($categories_products_query);
  20.     if ($cateqories_products['total'] > 0) {
  21.       $category_depth = 'products'; // display products
  22.     } else {
  23.       $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  24.       $category_parent = tep_db_fetch_array($category_parent_query);
  25.       if ($category_parent['total'] > 0) {
  26.         $category_depth = 'nested'; // navigate through the categories
  27.       } else {
  28.         $category_depth = 'products'; // category has no products, but display the 'no products' message
  29.       }
  30.     }
  31.   }
  32.  
  33.   require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
  34. ?>
  35. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  36. <html <?php echo HTML_PARAMS; ?>>
  37. <head>
  38. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
  39. <title><?php echo TITLE; ?></title>
  40. <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
  41. <link rel="stylesheet" type="text/css" href="stylesheet.css">
  42. </head>
  43. <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  44. <!-- header //-->
  45. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  46. <!-- header_eof //-->
  47.  
  48. <!-- body //-->
  49. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  50.   <tr>
  51. <!-- body_text //-->
  52. <?php
  53.   if ($category_depth == 'nested') {
  54.     $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
  55.     $category = tep_db_fetch_array($category_query);
  56. ?>
  57.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  58.       <tr>
  59.         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  60.           <tr>
  61.             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  62.               <tr>
  63. <?php
  64.     if (isset($cPath) && strpos('_', $cPath)) {
  65. // check to see if there are deeper categories within the current category
  66.       $category_links = array_reverse($cPath_array);
  67.       for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
  68.         $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
  69.         $categories = tep_db_fetch_array($categories_query);
  70.         if ($categories['total'] < 1) {
  71.           // do nothing, go through the loop
  72.         } else {
  73.           $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
  74.           break; // we've found the deepest category the customer is in
  75.         }
  76.       }
  77.     } else {
  78.       $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
  79.     }
  80.  
  81.     $number_of_categories = tep_db_num_rows($categories_query);
  82.  
  83.     $rows = 0;
  84.     while ($categories = tep_db_fetch_array($categories_query)) {
  85.       $rows++;
  86.       $cPath_new = tep_get_path($categories['categories_id']);
  87.       $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  88.       echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
  89.       if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
  90.         echo '              </tr>' . "\n";
  91.         echo '              <tr>' . "\n";
  92.       }
  93.     }
  94.  
  95. // needed for the new products module shown below
  96.     $new_products_category_id = $current_category_id;
  97. ?>
  98.               </tr>
  99.             </table></td>
  100.           </tr>
  101.           <tr>
  102.             <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  103.           </tr>
  104.           <tr>
  105.             <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
  106.           </tr>
  107.         </table></td>
  108.       </tr>
  109.     </table></td>
  110. <?php
  111.   } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
  112. // create column list
  113.     $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
  114.                          'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
  115.                          'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
  116.                          'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
  117.                          'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
  118.                          'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
  119.                          'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
  120.                          'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
  121.  
  122.     asort($define_list);
  123.  
  124.     $column_list = array();
  125.     reset($define_list);
  126.     while (list($key, $value) = each($define_list)) {
  127.       if ($value > 0) $column_list[] = $key;
  128.     }
  129.  
  130.     $select_column_list = '';
  131.  
  132.     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  133.       switch ($column_list[$i]) {
  134.         case 'PRODUCT_LIST_MODEL':
  135.           $select_column_list .= 'p.products_model, ';
  136.           break;
  137.         case 'PRODUCT_LIST_NAME':
  138.           $select_column_list .= 'pd.products_name, ';
  139.           break;
  140.         case 'PRODUCT_LIST_MANUFACTURER':
  141.           $select_column_list .= 'm.manufacturers_name, ';
  142.           break;
  143.         case 'PRODUCT_LIST_QUANTITY':
  144.           $select_column_list .= 'p.products_quantity, ';
  145.           break;
  146.         case 'PRODUCT_LIST_IMAGE':
  147.           $select_column_list .= 'p.products_image, ';
  148.           break;
  149.         case 'PRODUCT_LIST_WEIGHT':
  150.           $select_column_list .= 'p.products_weight, ';
  151.           break;
  152.       }
  153.     }
  154.  
  155. // show the products of a specified manufacturer
  156. if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  157. if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
  158. // We are asked to show only a specific category
  159. $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
  160. } else {
  161. // We show them all
  162. $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
  163. }
  164. } else {
  165. // show the products in a given categorie
  166. if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
  167. // We are asked to show only specific catgeory
  168. $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  169. } else {
  170. // We show them all
  171. $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from ((" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_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 = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  172. }
  173. }
  174.  
  175.     if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  176.       for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  177.         if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
  178.           $HTTP_GET_VARS['sort'] = $i+1 . 'a';
  179.           $listing_sql .= " order by pd.products_name";
  180.           break;
  181.         }
  182.       }
  183.     } else {
  184.       $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
  185.       $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  186.       $listing_sql .= ' order by ';
  187.       switch ($column_list[$sort_col-1]) {
  188.         case 'PRODUCT_LIST_MODEL':
  189.           $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
  190.           break;
  191.         case 'PRODUCT_LIST_NAME':
  192.           $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
  193.           break;
  194.         case 'PRODUCT_LIST_MANUFACTURER':
  195.           $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
  196.           break;
  197.         case 'PRODUCT_LIST_QUANTITY':
  198.           $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
  199.           break;
  200.         case 'PRODUCT_LIST_IMAGE':
  201.           $listing_sql .= "pd.products_name";
  202.           break;
  203.         case 'PRODUCT_LIST_WEIGHT':
  204.           $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
  205.           break;
  206.         case 'PRODUCT_LIST_PRICE':
  207.           $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
  208.           break;
  209.       }
  210.     }  
  211. ?>
  212.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  213.  
  214.  
  215. <!--
  216.  
  217.  
  218.       <tr>
  219.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  220.           <tr>
  221.             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  222. <?php
  223. // optional Product List Filter
  224.     if (PRODUCT_LIST_FILTER > 0) {
  225.       if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  226.         $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
  227.       } else {
  228.         $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
  229.       }
  230.       $filterlist_query = tep_db_query($filterlist_sql);
  231.       if (tep_db_num_rows($filterlist_query) > 1) {
  232.         echo '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . '&nbsp;';
  233.         if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  234.           echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
  235.           $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
  236.         } else {
  237.           echo tep_draw_hidden_field('cPath', $cPath);
  238.           $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
  239.         }
  240.         echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
  241.         while ($filterlist = tep_db_fetch_array($filterlist_query)) {
  242.           $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
  243.         }
  244.         echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
  245.         echo '</form></td>' . "\n";
  246.       }
  247.     }
  248.  
  249. // Get the right image for the top-right
  250.     $image = DIR_WS_IMAGES . 'table_background_list.gif';
  251.     if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  252.       $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  253.       $image = tep_db_fetch_array($image);
  254.       $image = $image['manufacturers_image'];
  255.     } elseif ($current_category_id) {
  256.       $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  257.       $image = tep_db_fetch_array($image);
  258.       $image = $image['categories_image'];
  259.     }
  260. ?>
  261.           </tr>
  262.         </table></td>
  263.       </tr>
  264.       <tr>
  265.         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  266.       </tr>
  267.  
  268.  
  269. -->
  270.  
  271.  
  272.       <tr>
  273.         <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
  274.       </tr>
  275.     </table></td>
  276. <?php
  277.   } else { // default page
  278. ?>
  279.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  280.       <tr>
  281.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  282.           <tr>
  283.             <td style="padding-left:3px" valign=top>
  284.             <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
  285.             </td>
  286.             <td style="padding-left:3px" valign=top>
  287.  
  288. <?php
  289.  
  290.  
  291.   $current_category_id = 62;
  292.   $listing_sql = "select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 = '62' order by pd.products_name";
  293.   $new_products_query = tep_db_query($listing_sql);
  294.   echo '
  295.               <table cellspacing=0 cellpadding=0>
  296.                <tr><td background=images/m27.gif width=160 height=36 colspan=10 class=bc><b> &nbsp; &nbsp; &nbsp;You\'ll also like</b></td></tr>
  297.                <tr><td colspan=10 height=8 bgcolor=#EFF3F3></td></tr>
  298.                <tr>
  299.        ';
  300.  
  301.  
  302.   while ($new_products = tep_db_fetch_array($new_products_query)) {
  303.    $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
  304.    if (tep_not_null($new_products['specials_new_products_price'])) {
  305.     $price = '<span style="font-size:9px"><s>' .  $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</s></span><br><br style="font-size:2px"><span class=bc1>' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>';
  306.    } else {
  307.     $price = '<span class=bc1>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>';
  308.    }
  309.    echo '
  310.                    <td valign=top bgcolor=#EFF3F3>
  311.                     <table cellspacing=0 cellpadding=0 align=center width=140>
  312.                      <tr><td valign=top width=52><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_description '], 52, 64, ' class=br') . '</a></td>
  313.                          <td width=10></td>
  314.                          <td valign=top width=78>
  315.                           <table cellspacing=0 cellpadding=0>
  316.                            <tr><td><b><a class=th9 style="text-decoration:underline" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></b><br><br class=px2></td></tr>
  317.                            <tr><td height=46 valign=bottom>'.$price.'</td></tr>
  318.                           </table>
  319.                      </td></tr>                                          
  320.                      <tr><td colspan=10 height=31 bgcolor=#EFF3F3 align=center><hr size=1 style="color:#DBD6D6"></td></tr>
  321.                     </table>
  322.                    </td>
  323.  
  324.                </tr>
  325.                <tr>
  326.            ';
  327.   }
  328.  
  329.  
  330.   echo '
  331.                </tr>
  332.               </table>  
  333.        ';
  334.  
  335.  
  336. ?>
  337.  
  338.             </td>
  339.           </tr>
  340.         </table></td>
  341.       </tr>
  342.     </table>
  343.  
  344.  
  345.               <table cellspacing=0 cellpadding=0 align=center>
  346.                <tr><td height=0></td></tr>
  347.                <tr><td><img src=images/m28.gif width=443 height=19></td></tr>
  348.                <tr><td><a href=<?=tep_href_link('index.php', 'manufacturers_id=10')?>><img src=images/m29.gif width=112 height=59 border=0></a><a href=<?=tep_href_link('index.php', 'manufacturers_id=11')?>><img src=images/m30.gif width=110 height=59 border=0></a><a href=<?=tep_href_link('index.php', 'manufacturers_id=12')?>><img src=images/m31.gif width=111 height=59 border=0></a><a href=<?=tep_href_link('index.php', 'manufacturers_id=13')?>><img src=images/m32.gif width=110 height=59 border=0></a></td></tr>
  349.                <tr><td><img src=images/m33.gif width=443 height=19></td></tr>
  350.               </table>
  351.  
  352.     </td>
  353. <?php
  354.   }
  355. ?>
  356. <!-- body_text_eof //-->
  357.   </tr>
  358. </table>
  359. <!-- body_eof //-->
  360.  
  361. <!-- footer //-->
  362. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  363. <!-- footer_eof //-->
  364. </body>
  365. </html>
  366. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  367.  
Nov 8 '08 #1
4 10636
Atli
5,058 Expert 4TB
Hi.

This simply means that the "products" table of your database is missing a "products_id" field.

Did you perhaps get the name wrong in the query?
Nov 8 '08 #2
tjc0ol
26
thanks man for the great help to me. I already corrected it. More power to all of you guys. ;o)
Nov 12 '08 #3
Hi tjc0ol, I have the same problem, and it seems to be that you fixed your problem could you please tell me where and how did you do that ?


Thanks,
Jan 24 '09 #4
Atli
5,058 Expert 4TB
Hi alhakeem.

This problem is usually caused by a typo in the query.
The error message tells you exactly which column name you spelled incorrectly.

Locate that name and make sure that it is in fact correct.
Note that the name is most likely case-sensitive.

If that doesn't fix it, there is probably something else going on.
In that case, post the problem in a new thread (so not to hijack this one), and including all the necessary info so we will take a closer look at it.
(See the How to ask a question for details on what info you should post)
Jan 25 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ndsoumah | last post by:
Hello Guys I'm trying to run this query $uneRequete = "SELECT * FROM Usager WHERE motDePasse = {$loginPassword}"; and I get this error message : Error 1054: Unknown column 'xxxx' in WHERE...
1
by: Navin | last post by:
Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. hi, guys i have asp application running on iis 5.0 windows 2000 i use...
1
by: William | last post by:
FD_SET( listener, &master ); fdmax = listener; FD_ZERO( &readfds ); FD_ZERO( &master ); FD_SET( STDIN, &master ); // STDIN is now among the set of fds that we pool for incoming data...
6
by: Steve | last post by:
I realize that this probably isn't a best practice, but I'm working with legacy code that has a query stored in one column of a table. Because the queries vary, the JSP page that selects a query...
12
by: yoyo | last post by:
So I'm trying to make an application that currently works with MySql, Postgre, etc... work with DB2. THe problem I have, is, the varchar column only goes to 32k. CLOB goes bigger, but at a major...
8
by: phillip.s.powell | last post by:
This query produces the following error: I'm sorry but I must have this "column" in the query, it's vital for required sorting order (you have to sort image_location_country in alphanumeric...
4
by: karthikeyanck | last post by:
I'm a newbie, I've installed PHP, Apache and MySQL on my Ubuntu system I've trouble in quering the data from MySQL when using the query function within PHP. I 've created a Database "test",...
1
rpnew
by: rpnew | last post by:
select `SearchWord` as 'Search Word', `SearchEngine` as 'Search Engine', `DomainName` as 'Domain Name', `Pos` as Position , `Link` as URL, `date` as 'Date Time' UNION select...
3
by: benicio | last post by:
Database query failed: Unknown column 'subj' in 'where clause' What does this error mean and how should it be fix?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.