0
I’m having a hard time making a table. Could someone make a table that shows the times an employee made during the month? the idea would be to show the employee beats during the month.
In my bank would have the table that would keep those employee beats:
markings
batida_id (int) is the id of the beat
collaborator (int) is the official’s registration
registration (time) is the time of the beat ex: 07:30:00, 12:00:00..
date (date) is the date of the strike.
guy (char) is the type of incoming or outgoing hit.
Example:
if an employee has the following strikes:
batida_id =>1 collaborator_id=> 1 date => 01/06/2016 beat => 07:30 type => input
batida_id =>2 collaborator_id=> 1 date => 01/06/2016 beat => 12:00 type => output
batida_id =>3 collaborator_id=> 1 date => 01/06/2016 beat => 13:30 type => input
batida_id =>4 collaborator_id=> 1 date => 01/06/2016 beat => 17:00 type => output
the table would have to look like this:
I managed to make only a part of the table, I can not make the logic to show the beats in front of the dates.
<table class="table table-striped">
<tr>
<th>Data</th>
<th>Dia Semana</th>
<th>Ocorrências</th>
</tr> <br />
<?php
$diasSemana[1] = 'Segunda-feira';
$diasSemana[2] = 'Terça-feira';
$diasSemana[3] = 'Quarta-feira';
$diasSemana[4] = 'Quinta-feira';
$diasSemana[5] = 'Sexta-feira';
$diasSemana[6] = 'Sábado';
$diasSemana[7] = 'Domingo';
for($dias = 1; $dias <= date('t',strtotime('2016-06')); $dias++)
{
echo "<tr>";
echo "<th>".$dias."</th>" . "<th>".$diasSemana[date('N', strtotime("2016-06-$dias"))] ."</th>" . "<th>";
}
echo "</tr>";
?>
</table>
Could someone help me?
Writing HELP, HELP, PLEASE does not make the question more urgent, everyone sees here needing help, writing HELP and HELP is totally redundant, be objective when writing. Take it as a constructive criticism. (I’ve already edited the title)
– Guilherme Nascimento
Another thing the "stack snippet" is obviously used to run javascript, html and css, ie front-end, there is no reason to use stacksnippet to put php, c++, java, c#, this will never work. Read Help and learn how to use text markup http://answall.com/help/formatting --- Help is for those questions. And please take it as a constructive criticism. (I’ve already removed the snippet stack)
– Guilherme Nascimento
Bro, hand me the select you’re doing
– Jhonatan Simões
that’s the problem, like how I do this kind of sql?
– Smoke Rohden
And there’s already the bank and the tables?
– Guilherme Nascimento
Already exists the bank and the table...
– Smoke Rohden
I was trying here but no chance, I can’t bring the appointments in front of the date
– Smoke Rohden