Best way to combine two tables in php [on hold]

53
February 12, 2019, at 7:10 PM

I'm working on a project where I want to be able to create a weekly calendar and display shifts for that week next to each employee's name.

The database is split into two tables:

Partners:

id, first_name, last_name

Shifts:

shift_id, shift_date, shift_start, shift_end, partner_assigned_id

I am trying to achieve something like this

I have attempted to use JOIN and then transpose the columns, but shifts are arranged into rows, not columns.

 <?php $result = $mysqli->query("SELECT * FROM partners") or die($mysqli->error); ?>
  <?php while($row = $result->fetch_assoc()): ?>
          <tr>
            <td class="sidebar-text"><?php echo $row['first_name'] . " ";  $string = $row['last_name']; echo $string[0] . "."; ?></td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
            <td>12:00 PM - 12:00 PM</td>
          </tr>
          <?php endwhile; ?>

What would be the best way for me to go about querying information from the "partners" database to populate the names along the right side of the table, and then query the shifts table to get shifts that correspond with the date at the top?

READ ALSO
WP Acceptance and the composer.json file required

WP Acceptance and the composer.json file required

I am having trouble setting up WP Acceptance and would like some assistance pleaseIn the documentation it states that it is not required to use WP Local Docker so I have the basic required items installed already

54
Azure AD SSO = AADSTS50020 - multi-tenant, How do I allow external tenants to register to my app?

Azure AD SSO = AADSTS50020 - multi-tenant, How do I allow external tenants to register to my app?

We have a SaaS app and we are integrating with azure ad sso with oauth2 (locally for now) using https://githubcom/TheNetworg/oauth2-azure (v2 common endpoint)

30
Fatal error: Cannot redeclare __() (previously declared in D:\wamp\apps\phpMyAdmin\libraries\sql-parser\src\common.php:17)

Fatal error: Cannot redeclare __() (previously declared in D:\wamp\apps\phpMyAdmin\libraries\sql-parser\src\common.php:17)

I was working with PMA as always but today PMA freezes when I tried a simple requestSo I tried to reload the browser (Chrome), but now I can't access anymore to PMA due to the following error :

23