Say my database has 3 columns :
"Date", "Stocks", "Price".
Say I have over 100 stocks in the list. Included in them are Microsoft, Dell, IBM, Yahoo, Oracle...and so on.
How do I select ONLY the MOST RECENT data for Dell and IBM.
Basically, Dell and IBM are listed many times and each with a different date and price.
But I want to select and display only their most recent data from the database.
I want to do this using only 1 query.
I tried the following but it doesn't give me the most recent data for both :
$result1 = mysql_query("SELECT * FROM tabledata WHERE stock IN('Dell', 'IBM') ORDER by Date DESC LIMIT 1",$db);
This only gives me the data for Dell since it has the later data. But I also want the most recent data for IBM as well.
thanx