The first table of employee data
|ids| name |
+=============+
|1 | Ibrahim |
|2 | Rizky |
|3 | David |
The second table of people who come to work
|id| ids | date |
+========+============+
|1 | 1 | 2018-05-01 |
|2 | 2 | 2018-05-01 |
|3 | 3 | 2018-05-01 |
|4 | 1 | 2018-05-02 |
|5 | 3 | 2018-05-02 |
|6 | 1 | 2018-05-03 |
|6 | 2 | 2018-05-03 |
|7 | 1 | 2018-05-04 |
|8 | 2 | 2018-05-04 |
|9 | 3 | 2018-05-04 |
the result I want, more or less like this
|name | 2018-05-01 | 2018-05-02 | 2018-05-03 | 2018-05-04 |
=========+============+============+==-=========+============+
|Ibrahim | 1 | 1 | 1 | 1 |
|Rizky | 1 | | 1 | 1 |
|David | 1 | 1 | | 1 |
Can you help me, I want to display such data, the following date written is partial example, I want it one full month from the first to the end of the month. 1 means the person goes to work, empty means not coming to work.
can you help me with this, on how to query its join and how to display iteration in its appearance?