Edit: hey people, i'm already using php, i didn't mean to ask that. I was asking how can i display 3-columned mysql result in an 8-column html table
--work table-- --crew table--
date | hours date | name
2013-02-03(Sun) 8 2013-02-03 john
2013-02-04(Mon) 7 2013-02-03 sam
2013-02-03 peter
2013-02-04 john
2013-02-04 sam
i have these 2 tables to keep record of the hours worked by employees.
i need to show this data as a timesheet.
But how do i show 8 columns in this html table below ?
i mean suppose if you run this query:
SELECT hours, name, DAYNAME(work.date) day
FROM work
LEFT JOIN crew ON work.date = crew.date
WHERE WEEK(work.date) = 5
it'll show 3 columns. So how do i build this html table?
This mysql result to
hours name day
8 john Sunday
8 Sam Sunday
8 Peter Sunday
7 John Monday
7 Sam Monday
this html table (How?)
Name Sunday Monday Tuesday..(day name can be written in html)
John 8 7 ...
Sam 8 7 ...
Peter 8 - ...