JangoF Posted March 15, 2007 Posted March 15, 2007 Hi, I don't think my question belonged in the MVS thread, so I made a new topic about it. So basically I am trying to add product images for each product that is in packaging slip. I have got it working fine with 1 product (after loads of hours), but when there is more than 1 something goes wrong. Here is the code I am using at the moment: <?php $products_id_query = tep_db_query("select products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_products_id = '" . $oID . "'"); $products_id = tep_db_fetch_array($products_id_query); $image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $products_id['products_id'] . "'"); $thumb_image = tep_db_fetch_array($image_query); echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $thumb_image['products_image'], $oID, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?> I'm not very good with using while and stuff, so can anyone help me fix this so that it works no matter how many products there are? :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.