First of all I would like to say hello to everyone, this is my first post. I’m not a PHP professional, actually far from it. But I’m stuck in such a situation where I should improvize and try to fix this problem I’m facing.
We have a website pulling some Stocks information on a regional market. All the data are available on a MYSQL database. We’re using PHP on our website. Everything is working perfectly but next week one of the tables are going to have different database structure. Some of the changes are easy (instead of MTRADES now one column is called PTRADES) but there’s one tricky thing I need to do.
Before I used to pull the Market Price Index and Weighted Index from a specific column (easy).
Now I need to pull the Price Index and Weighted Index from a specific CELL.
Under a column called STKNO the value 10 is where the row is for the PREF column that contains that Weighted Index value. Same thing for Price Index but at STKNO 11.
Example:
Date - STKNO - PREF
xxx - 10 - 100
xxx - 11 - 5,000
To pull the value of PINDEX I need point at PREF of the row that contains STKNO 11. While for WINDEX I need to pull the PREF of the row that contains STKNO 10.
I hope that make sense and I hope it’s easy to implement.
Thanks in advance!