The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Date storing for an action made?
xxkasperxx
post Apr 17 2013, 08:03 PM
Post #1


Serious Coder
*****

Group: Members
Posts: 261
Joined: 30-April 11
Member No.: 14,449



How can I store the date that someone entered somthing?

I have a table with the rows of Name | ADue | APay | Date | Email | Percent | Notes |

So basically when someone pays, I go in and then put that in, and it auto fills the date, but how do i Store that they payed 12.00 on 4/17/13 and then also have 3.00 stored on 3/5/13 ?

Does that make any sense?

I will be doing all of the adding and query's through PHP, but for now I am setting up everything with phpMyAdmin.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
xxkasperxx
post Apr 17 2013, 08:28 PM
Post #2


Serious Coder
*****

Group: Members
Posts: 261
Joined: 30-April 11
Member No.: 14,449



I figured it out, I create a table for each person, and then create a new row each time something is inserted..
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 17 2013, 10:14 PM
Post #3


.
********

Group: WDG Moderators
Posts: 8,075
Joined: 10-August 06
Member No.: 7



I'm no good at DB:s, but couldn't you also use a single table with a new row for each date?

Maybe the best approach depends on how many persons and/or payments there are.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Apr 17 2013, 10:43 PM
Post #4


Jocular coder
********

Group: Members
Posts: 2,298
Joined: 31-August 06
Member No.: 43



QUOTE(xxkasperxx @ Apr 18 2013, 10:28 AM) *

I figured it out, I create a table for each person, and then create a new row each time something is inserted..


If this is a very small ad hoc arrangement this may do, but it isn't really the way to handle things. You need a table of *customers*, including name, address, etc., then a table of *transactions*, including date, amount, customer code etc.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th March 2019 - 07:16 AM