Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fetching data...


Dr. DK

Recommended Posts

Posted

Hello all, :'(

 

I'm still getting around the MySQL and its functions, so I need some help please.

 

Does anyone know how would I select and list all the data inside my product attributes, for example I'm only using Color and Size!

How do I fetch the data?

 

I've tried to do the following:

     <td class="fieldValue"><?php 
               $option_values_query = tep_db_query("select * FROM " . products_options_values . " WHERE products_options_values_id = 16"); 
   echo '<select name="'.$attributes["product_options_values_id"].'">';
               echo '<option selected></option>';
               while ($option_values = tep_db_fetch_array($option_values_query)) {
              	 echo '<option value="'.$option_values["products_options_values_id"].'">'.$option_values["products_options_values_name"].'</option>';
               }    
   echo '</select>'; ?> 	 
   </td>

But I only get a list of 1 of the sizes. If I try to add

AND products_options_values_id = 17

it doesn't display anything. ANy help is greatly appreciated!

-----------------------------------------------------------------------

 

Sincerely,

Dr. DK

Archived

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

×
×
  • Create New...