I have a database of stock prices and their dates.
I want to display a table where it shows the list of stocks from the last day they were entered.(eg. if December 15, 2000 was the last list of entries, then I want a table to only display December 15,2000).
I tried the following query bnt it doesn't seem to work. Anyone know why?$curdat =
$curdat = mysql_query("SELECT Date from table ORDER BY Date DESC LIMIT 1");
$result = mysql_query("SELECT * FROM table WHERE Date = $curdat",$db);
And then an array of results according to $result.
Somehow my two MYSQL queries aren't working.
Can anyone know a script to fix this>
thanx
I want to display a table where it shows the list of stocks from the last day they were entered.(eg. if December 15, 2000 was the last list of entries, then I want a table to only display December 15,2000).
I tried the following query bnt it doesn't seem to work. Anyone know why?$curdat =
$curdat = mysql_query("SELECT Date from table ORDER BY Date DESC LIMIT 1");
$result = mysql_query("SELECT * FROM table WHERE Date = $curdat",$db);
And then an array of results according to $result.
Somehow my two MYSQL queries aren't working.
Can anyone know a script to fix this>
thanx