Hello Sergey,
Thanks for your prompt reply,
I guess I did not give you enough information:
I have four tables: User, customers, Orders, Merchant
Every user has his own customers I want them to see only his customers total dollar amount expend, with like a dropdown to select a customer to see the total dollar amount expend by that customer and field with the dollar amount not expend left in customer account.
select `UserId`,
`GroupID`,
`wordPass`,
`UserSince`,
`Name`,
`LastName`,
`Phone`,
`email`,
`Notes`
From `users`
select `CustomerId`,
`UserId`,
`CustomerSince`,
`Name`,
`LastName`,
`Phone`,
`email`,
`InitialDollarAmount`,
`Notes`
From `customer`
select `OrderId`,
`UserId`,
`CustomerId`,
`MerchantID`,
`Amount`,
`Date`,
`Notes`
From `orders`
select `MerchantID`,
`MerchantName`,
`MerchantWeb`,
`Phone`,
`Notes`
From `merchant`