A Question??

Any problem with SQL can be discussed here.
Post Reply
hossamkiwan
Posts: 344
Joined: Tue Nov 07, 2006 8:42 pm

A Question??

Post by hossamkiwan »

A Question??

How Can I solve this problem in SQL ??

profit of selling_______________loses of payments___ Total_____day
12__________________________23________________-11_____11/11
26__________________________ 43____________-11+-23____12/11
34__________________________ 12 _________ -11-23+22____13/11
23__________________________ 32________-11-23+22-9 ____ 14/11
62__________________________ 21_____-11-23+22-9+41____15/11
____________________________________________________________


I want to know Total every day ???


Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

u have to use php to count your total.
As i understand from your example you have to take digit from previous day and plus or minus whatever digit you need.
OR
Try to view mysql manual- i know that it can do mathematical operation.
Image
vinter
Posts: 27
Joined: Fri Dec 22, 2006 5:08 pm

Post by vinter »

are you allowed to use php?
Jonxmartini
Posts: 325
Joined: Sat Dec 16, 2006 3:57 pm

Post by Jonxmartini »

vinter wrote:are you allowed to use php?
Why wouldnt you be allowed to use php?
nopq478

UGG On Sale for cheap

Post by nopq478 »

thecobra
Posts: 196
Joined: Tue Mar 11, 2008 11:30 am

Post by thecobra »

Jonxmartini wrote:Why wouldnt you be allowed to use php?
Due to the fact people can use it to hack our site... but we are still allowed to use it :)
Post Reply