I need to select a value on a MYSQL table using PHP.
Basically I have PDATE column (which I need to make sure it's today's date) then STKNO column (if the value there is 11, then it's Price Index and if the value there is 10 then it's Weighted Index). Which means every Day has two values (PDATE) one has STKNO 10 and STKNO 11 columns. The value I want to pull is a cell in a column PLAST. How do I do that?
Example:
PDATE | STKNO | PLAST
2012-06-11 | 11 | 1000
2012-06-11 | 10 | 90
The cell that reads 1000 is today's Price Index while the cell that reads 90 is today's weighted index. The "indicator" is column STKNO, if its 11 it's price and if it's 10 it's weighted. How can I select/pull that?
Thanks :)