osHacker Posted May 27, 2007 Share Posted May 27, 2007 I think this is rather simple, but I can't figure it out, I have an html table on my product_info page that I want to show the price of one product, no matter what product the customer is looking at. But I don't want the actual price to be html, I'd like it to query for the current price from the database, since it will change freqently. Can anyone help me with the php/mysql code? the query I want is SELECT products_price FROM products WHERE products_id = 123 but I'm not even sure the query is right, and I can't place it into a php code and get it to work. Any help? Thanks, osHacker Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2007 Share Posted May 28, 2007 you need to use the osc wrapper functions for the sql $check_query = tep_db_query(SELECT products_price FROM " . TABLE_PRODUCTS . " WHERE products_id = '123'); if($check_array = tep_db_fetch_array($check_query) ) { echo $check_array['products_price']; } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.