GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Feb-2005, 10:51
akueffler akueffler is offline
New Member
 
Join Date: Feb 2005
Location: Montana
Posts: 1
akueffler is on a distinguished road
Question

Running Subtotals and Grand Totals problem


Hello!
My name is Aaron and I just joined this forum.
I’m a newbie at php/mysql, so please forgive me if I ask a question that seems too simple.

I don’t think this question is that simple but I could be wrong.

I was wondering if anyone could help me out, or at lease point me in the right direction.

Here is the situation:

I created a simple php web form that my coworkes can enter information in and it loads it to a database. I even am able to display on a page all the enteries in the table. That was the easy part… I am now attempting to create a display page that will only display the totals for a certain month.

Table: sales_rerun
Fields: id (hidden, auto increase),month, client, job, reason, cost

I would like to have a pull down menu in order to select a certain month. When the month is selected, the results would display with a grand total. The result would look similar to this:

Month Client Job Reason Cost Subtotal Grand Total
Jan n/a n/a n/a 2.00 2.00
Jan n/a n/a n/a 5.00 7.00 7.00

I would also like to have a YTD button that would display all months as well as running totals. The result would look similar to this:

Month Client Job Reason Cost Subtotal Grand Total
Jan n/a n/a n/a 2.00 2.00
Jan n/a n/a n/a 3.00 5.00
Feb n/a n/a n/a 2.00 2.00
Mar n/a n/a n/a 5.00 5.00 12.00

Is this possible? And if so, is it somewhat easy to do? Or should I just figure out a different way to display the results? It seems to me a shopping cart script would work but after looking at a few sample scripts I’m lost.

Can anyone help?

Thanking you in advance!

Aaron
aaron@cre8tive.cc
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:17.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.