It seems to me that you have two options:

1) Insert the price for each item every day and use a SELECT similar to that
which I posted.
2) Use different tables for each food if you don't like (1)

Your request, while easy on the surface, is not so easy when the dates differ
and you aren't using a scripting language.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


----- Original Message -----
From: "Mateusz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, 01 June, 2003 19:55
Subject: Re: SELECTing last occurences from a table


> SELECT * FROM myTable ORDER BY COLUMN_WHICH_CONTAINS_INSERTED_DATE ASC
LIMIT
> 1;
> COLUMN_WHICH_CONTAINS_INSERTED_DATE is a column which contains the date
that
> the record was inserted

This would only select one row (the most recent). I need a set of rows, one
for _each_ type of food (one and only one for tomatoes, one and only one for
potatoes and so on).

Mateusz Uzdowski


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to