Any problem with SQL can be discussed here.
hossamkiwan
Posts: 344 Joined: Tue Nov 07, 2006 8:42 pm
Post
by hossamkiwan » Wed Nov 22, 2006 12:24 am
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 » Thu Nov 23, 2006 6:17 pm
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.
vinter
Posts: 27 Joined: Fri Dec 22, 2006 5:08 pm
Post
by vinter » Sat Dec 23, 2006 11:42 am
are you allowed to use php?
Jonxmartini
Posts: 325 Joined: Sat Dec 16, 2006 3:57 pm
Post
by Jonxmartini » Sat Dec 23, 2006 3:52 pm
vinter wrote: are you allowed to use php?
Why wouldnt you be allowed to use php?
nopq478
Post
by nopq478 » Fri Nov 20, 2009 3:49 pm
thecobra
Posts: 196 Joined: Tue Mar 11, 2008 11:30 am
Post
by thecobra » Mon Nov 23, 2009 3:02 pm
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