Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sql help needed for tweak to Family Products


LeeH

Recommended Posts

Can someone help me get this sql query correct? I'm getting this error:

Parse error: parse error, unexpected T_VARIABLE in c:abria merlinapachehtdocscatalogproduct_info.php on line 116

 

I've added the Family Products mod & am trying to get related products to show up in the description area, and not as an info box. There are more fields I need to pull from products_descriptions, but for now, such getting a basic query to display would be a tremendous help. Anybody out there feel like helping a frustrated newbie?

 

Thanks

 

 

<? php

$currentid = $HTTP_GET_VARS['products_id'];

$famid_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where where products_id = " . $currentid);

while ($thisquery = tep_db_fetch_array($famid_query)) {

if ($product_info_query['products_family'] != '') {

$my_query = tep_db_query("select products_family, products_id, products_image from " . TABLE_PRODUCTS . " where products_id != '" . $currentid . "' and products_family = '" . $thisquery['products_family'] . "'");

  while ($family = tep_db_fetch_array($my_query)) {

       $family['products_name'] = tep_get_products_name($family['products_id']);

?>

     <tr>

       <td class="main"><br><?php echo <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $family['products_image'], $family['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . $family['products_name'] . '</a>')</td>;

     </tr>  

 <p><?php echo stripslashes($product_info['products_description']); ?></p>

<?php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...