custom post types containing a collection of items

I think you’ve got the Custom Post Type a bit wrong, the products are not saved in products table but in the posts table

prefix_posts(post_id,title,content,...

So to use the options in relation to post_id you can use the build-in custom fields
which are key/value pairs.

The key is the name of the meta-data
element. The value is the information
that will appear in the meta-data list
on each individual post that the
information is associated with.

either by using the build-in UI or creating a custom metabox by plugin or by code
and they are saved in postmeta table

prefix_postmeta(meta_id,post_id,meta_key,meta_value)

and to access these option you use get_post_meta() function:

$meta_values = get_post_meta($post_id, $key, $single);

for example say you have a field named price so to get its value:

$price = get_post_meta($post_id, 'price', true);

and this will get the price of the product with the same post_id.

hope this helps.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)