Good question... I dunno what is the answer. I'll do some research in Google and get back to you if I find an useful answer. You should email the people at iPage as they probably could help you..
You could store all of them in an array and use the id as the key..
$result=mysql_query("select products_price, products_id from products");.
Note: this only gets the price stored in the products table. It doesn't get specials prices, prices for attributes, etc...
Excellent, that works a treat..
But in my haste I think I have gone the wrong route because the price we are pulling is the raw database price that doesn't have the tax and currency applied etc etc, we need the same prices as would show within a normal product page..
So I need to use OSC's native functions to pull the price, any ideas?.
Thanks for your advice so far, I have learnt a lot about basic php..
Look at the code to pull the price on the product_info.php page. Copy the sql query and take out what you don't need...
I am creating a magazine page within Oscommerce, to encourage sales in my site..
I would like to be able to pull in information from the database, such as the price individually per product. This page would be static apart from these live fields so that if I change the price in the admin and it changes it on this page also..
I was trying to start with something like:-.
$result = mysql_query( "SELECT products_price FROM products WHERE products_id = 42");.
<p><?php echo"$result" ?>.
I have already called in application_top for native osc commands, but I don't know how to display just the price from products_id number 42 for example..
Any help would be greatly appreciated..
Thats Great thanks..
Is there a way that I can pull in all the prices for example, and pull the right one and the right time..
<?php $result=mysql_fetch_array(mysql_query("SELECT products_price FROM products)); ?>.
<p> Product One's Price is <?php echo $result[products_price WHERE products_id = 1]"; ?></p>.
<p><p> Product Two's Price is <?php echo $result[products_price WHERE products_id = 2]"; ?></p>.
Or something that actually works unlike my example..
Thanks in advance.