Forum Moderators: coopster

Message Too Old, No Replies

Totalling Customers Purchases

         

brodie_r

2:06 pm on Oct 9, 2005 (gmt 0)

10+ Year Member



I have been trying to follow: [evolt.org...] but have had no luck. I Currently have a table called 'users' where a customer is located with their first_name and last_name, along with a user_id. I then have a 'purchases' table, and i have a form that i can add purchases in, which adds the date, amount, user_id to a new row.

I have then got a php page which shows the purchases for users, and shows all the results of which row has user_id= it then brings it up. But what i am trying to do, is have like a top 5 spenders page, or even just get the php page to have a total. So if it searches the purchases table for all purchases under user_id 1, and finds say 5 of them, it will add them all together and give me a total for them.

Jaunty Edward

9:41 am on Oct 10, 2005 (gmt 0)

10+ Year Member



Hi,

the first thing that you should do is copy paste make the same DB and check if everything is working.

Once you are sure that its working then start modifying it as per your needs. Since you have not mentioned what is happening what sort of error is coming and other basic info we can't help you much.

Please update. And let us know what is the error coming up.

Bye