Are you absolutely sure it exists? (Check for prefixes)



>Should "Join products_with_attributes_stock PWAS" be "join pa.products_with_attributes_stock PWAS" ??

No - this isn't valid SQL.

Are you using table prefixes - in which case cactus2_zc2.products_with_attributes_stock may really be something like cactus2_zc2.zen_products_with_attributes_stock.
yes, am using a table prefix zen. Need to get the glasses fixed
In fact, to test this theory, I have amended the SQL to use the table define - try this query instead

select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa join " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
on pa.options_values_id = pov.products_options_values_id
join " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " PWAS
on PWAS.stock_attributes = pa.products_attributes_id
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "'
and PWAS.quantity > 0 " .
$order_by;

Post back with your results.

Kev
Tried the revised SQL, and now the out-of stock items are masked from the selection menu, BUT, all selection menus for items that are not "stock by attributes" have the selection list truncated such that no selections are visible. Go to http://offlinestore.azbizp.com/index...products_id=83 for an example.