buglydia Posted October 16, 2005 Share Posted October 16, 2005 I want to do this in product_listing: <?php if (product already buyed) { ?> <tr> <td><span class="markProductPurchased"><b><?php echo TEXT_PURCHASED; ?></b></span></td> </tr> <?php } elseif (product not already buyed) { ?> <tr> <td><span class="markProductNewForYou"><b><?php echo TEXT_NEW_FOR_YOU; ?></b></span></td> </tr> <?php } ?> I built a SQLselection: <?php $order_check = tep_db_query("SELECT op.products_id FROM ".TABLE_ORDERS_PRODUCTS." AS op, ".TABLE_ORDERS." AS o WHERE o.customers_id = $customer_id AND op.orders_id = o.orders_id"); $ordercheck = tep_db_fetch_array($order_check); ?> Is this correct? And how can I put it into the "if" statement? // ????? what about this way if ( ($listing['products_id']) = ($ordercheck['products_id']) {... How can I do this. Can anybody help me please? I'm an absolutely newbie. Or is there a better way to do this? Thanks in advance Lydia Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.