Something like this for the SQL
SELECT ( t1.price + t2.price ) as total FROM table t1, table t2 WHERE
t1.id=1 AND t2.id=5;
Jason Lotito
[EMAIL PROTECTED]
www.NewbieNetwork.net
> -Original Message-
> From: Alen Nonkoviè [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 9:31 A
Use smth like this ->
$need_prices = '01,02';
$prices = new Array();
$sql = "select * from price_list where id in ($need_prices)"
$result = mysql_query ($sql);
{//cycle while $result is not empty - for every record
$row = mysql_fetch_array($result);
$prices[$row["id"]] = $row[
Allen,
Have you a table of recipes, like so:
recipe1 item1
recipe1 item2
...
recipe1 itemn
recipe2 item1
You could then fetch all the items for a given recipe, and loop through the
returned results (an array), concatenating the prices.
Alternately, you store all your items in an array for each
3 matches
Mail list logo