tald Posted March 18, 2007 Share Posted March 18, 2007 Hello, I am a Music Tech student in the U.K. and have been given a PHP+MYSQL assignment wich im having trouble with and was hoping some one on here could help. The admin assistants can enter the number of hours that each employee has worked on a particular date in a particular month (hours are variable depending upon customer demand) and at the end of the month need to run off a pay slip for each employee containing the following data: I know how to add, delete and modify the data, the only thing im not sure of is the databse structure for the dates. Does any one have any advise? Thanks in advance. Trevor. Link to comment https://forums.phpfreaks.com/topic/43300-date-database/ Share on other sites More sharing options...
Barand Posted March 18, 2007 Share Posted March 18, 2007 MySql uses "YYYY-MM-DD" format columns of type DATE eg INSERT INTO mytable (empdate, emphours) VALUES ('2007-03-10', 6.5) or, to always enter todays's date INSERT INTO mytable (empdate, emphours) VALUES (CURDATE(), 6.5) Link to comment https://forums.phpfreaks.com/topic/43300-date-database/#findComment-210228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.