Hello
I do recurring Billing. I will be adding this to my current Customer Control Panel.
All of my customers records are kept in a MYSQL Database and I currently look at those records monthly and from that information do my billing.
Some customers have multiple accounts... So I could gather the info for a customer by selecting * from accounts where clientid = $clientid, etc....
So Lets say Clientid: TomJones has 5 accounts and each one has a different fee, etc...
The object here is that Client Tom Jones can look at a paticular date and see that he was billed for the following services... and so I can go back and look also..
Service 1 $5.00
Service 2 $10.00
Service 3 $15.00
Invoice Total: $30.00
The reason I want to save them to a diff table is because things will get deleted from the accounts table and change often and I want the client to be able to go back and look at what they were billed for 6 months ago even if they dont have the same accounts now...
Ideally I would click a link for a client (To Indicate as Paid, etc) and the process would run.. (enterinvoice.php?clientid=the clients id)
Question: What is the best way for me to take all of ClientID: TomJone's accounts and save them to a diff table ??
Question2: Should I have it so for each account record a table is created ? That seems like it would become a lot of tables over time ?? OR
Is ther a way of using a foreach() statement and inserting them into already exsisting tables ? The problem with that is clients have from 1 to 60 or 70 accounts... so I would have to create an enormous amount of fields in the table OR
Is there a way of combining them into a few feilds and then bringing them back out... Like all of the Service Descriptions(service1, service2, etc) go into one field and all of the Fees go into another field and then their is a way to bring them out and view them correctly, OR Service 1, Fee 1, , service 2 fee2 , into a field (some seperator like a comma) ???
OR
I had thought that perhaps saving to a text file rather than MYSQL ??
And If there is answers could someone PLEASE show me examples as this stuff goes beyond my current PHP Knowledge..
BUT since I have built my entire Backend from samples I have gotten here at PHP Builder and what I have read in books and manuals I think if someone can help me get headed in the right direction I can get this done...
Any Help would be Greatly Appreciated..