Re: [PHP] Newbi Question with calculate

2011-04-06 Thread Silvio Siefke
Hello,

sorry i has not correct write.

The example when is finish can see at
http://silviosiefke.de/finance/stock/stock.php

For this i not use a mysql Database, its normal not so much at data.

I have write the source as Text Files:

http://silviosiefke.de/finance/finished/txt/index.txt
- That is the Start Page.

The included Files:
http://silviosiefke.de/finance/finished/txt/include.txt -> Yahoo API
http://silviosiefke.de/finance/finished/txt/quote.txt -> Yahoo Symbols
http://silviosiefke.de/finance/finished/txt/variable.txt -> Calculate

If I calculate all the shares in my portfolio, then I have to create for
each share a file variable.php. Thats little long, is not the problem i
make it, but i think there is a chance to use the file variable.php at
moment for all what come in my portfolio?

For example at Moment i calculate Beiersdorf AG, the next in Portfolio
is Deutsche Bank AG. Now i must write a new variable.php for Deutsche
Bank. Or is there a chance that i can write one variable.php for all
Shares what i take in the portfolio.

Sorry for my english, i know its not perfect. Hope all can understand
what i mean. I learn every day and i find good that i not must use
google since few weeks.


Thanks for help, have nice day at all.


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbi Question with calculate

2011-04-06 Thread Me

I will give you a mysql example.

Apply the logic to the table during the query so you can just loop over the  
results like such.


$ABEI=12;
$query = ' select last * '.$ABEI.' AS resulta From table';






Sent via DROID on Verizon Wireless

-Original message-
From: Silvio Siefke 
To: php-general@lists.php.net
Sent: Wed, Apr 6, 2011 12:50:20 GMT+00:00
Subject: [PHP] Newbi Question with calculate

Hello,


i have write a script for my Stock portfolio and now im not really find
something which can me help.

In the table php calculate me the Present Value and the Percent with
this code:







Is it possible to apply logic to the whole table? Or do I write for each
additional item the same source code?


It were nice someone has a Tip for me? Thank u.


Silvio

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php