![]() If this answers your question, please click on the check mark to accept. I'd delete all the data from the table and start fresh, adding rows and then updating one row only once, and checking the table after each action to record the contents and watch what happens. is updating correctly on another phone I have access to, both running 13.4. If I open yahoo finance quotes and movements are fine. The stick quotes themselves are updating. My best guess is that the data provided above is somehow inconsistent with the actions taken. For the past few days, stock movement figures are not updating. Why didn't the total update?Īs for the GOOG updates, I have no idea what's happening there. I'm not sure what's happening with the total because the phpliteadmin screenshot shows NULL. It would appear that it is setting each row's price to 215.05 three times. To drill down a little farther, let's look at the 3 AAPL rows. Running updates works and says my finance::quote is up to date. ![]() I've re-installed Strawberry Perl 64 bit and rerun install-fq-mods.cmd to setup finance::quote system. Hint: ON DUPLICATE UPDATE is your friend. For the last couple of months I have found that updating currencies using the price editor is not working. On the other hand, if this is a portfolio table, then why are there multiple rows for each stock+user combination? In this case, the combination of those two fields should be used as a unique index and the row created if it doesn't exist, updated as stocks are bought and sold, and deleted if all stocks are sold. I'm thinking that if you get the ID field in the first select, then that's all you need to identify the row to be updated, since it is a unique field.Īs a side comment, if this is a transaction history table, then multiple rows for the same stock and user are appropriate, but then, why would anything in them need to be changed? Since you're allowing multiple rows with the same symbol for a given user, you need to update WHERE symbol =. In order to get this right, the code needs to select the exact row(s) to be modified. (Not sure what's going on with GOOG, maybe you did something previously to get the same data?) This SQL code says to update the price and total for EVERY row in the table that has the given symbol. Correct any spelling mistakes and when you press Enter, Excel will do its best to find matching. If you see instead of an icon, then Excel is having a hard time matching your text with data in our online sources. "It did exactly what I said, but not what I wanted!" -) To see all of the fields available for a company or fund, click the stock icon ( ) or select the cell and press Ctrl+Shift+F5. Here is what the debugger code shows(looks ok here): DEBUG:cs50:UPDATE test SET price=1207.33, total=6036.65 WHERE symbol='GOOG'ĭEBUG:nnectionpool:Starting new HTTPS connection (1): ĭEBUG:nnectionpool: "GET /1.0/stock/aapl/quote HTTP/1.1" 200 NoneĭEBUG:cs50:UPDATE test SET price=215.05, total=430.1 WHERE symbol='AAPL'ĭEBUG:cs50:UPDATE test SET price=215.05, total=645.1500000000001 WHERE symbol='AAPL'ĭEBUG:cs50:UPDATE test SET price=215.05, total=215.05 WHERE symbol='AAPL' What am i doing wrong with my loop? rows = db.execute("SELECT symbol, shares, price, total FROM test WHERE sessionid=:id", id=session)ĭb.execute("UPDATE test SET price=:price, total=:total WHERE symbol=:symbol", price=price, total=total, symbol=quote) In the table itself, price shows the same for all rows, while total remains blank. I seem to have it mostly correct, as values are being updated properly, however all rows in table are being updated instead of just one at a time.Īs screenshot shows, it seems i am going through the loop and all 4 rows are being updated 4 times instead of each row just once. I am trying to set up to update my price and total column in my sql table. What can cause this? The developer forum for yql is down/unreachable so I'm hoping someone here can help me.First time asking question, sorry if formatted badly. After I request the information a third time in firefox the quotes are for some reason reversed back to 9:00am this morning. At yahoo I can even see that the stocks are up and streaming. Using chrome gives me updates from 9:00am, however using firefox gives me updates at 2:25pm using the same query. ![]() My yahoo finance quotes don't update accordingly even though the quotes are streaming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |