This commit is contained in:
FlyInTheBox 2023-10-30 14:34:13 +01:00
parent d7e069dce2
commit b25e7118a5
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ if (!mysqli_query($id_conn, $sql_ins))
echo '<br>' . substr($depts, 6); echo '<br>' . substr($depts, 6);
} }
$sql_mgr = "SELECT id, last_name FROM emp"; $sql_mgr = "SELECT DISTINCT szef.id, szef.last_name FROM emp AS prac LEFT OUTER JOIN emp AS szef ON prac.manager_id = szef.id";
$wyn_mgr = mysqli_query($id_conn, $sql_mgr); $wyn_mgr = mysqli_query($id_conn, $sql_mgr);
if (!$wyn_mgr || mysqli_error($id_conn)) { if (!$wyn_mgr || mysqli_error($id_conn)) {
echo "Błąd w zapytaniu o departamenty: " . $baza . '(' . mysqli_error($id_conn) . ')'; echo "Błąd w zapytaniu o departamenty: " . $baza . '(' . mysqli_error($id_conn) . ')';

View file

@ -41,7 +41,7 @@
<tr><td>Imię: </td><td><input type='text' name='imie' ></td></tr> <tr><td>Imię: </td><td><input type='text' name='imie' ></td></tr>
<tr><td>Użytkownik: </td><td><input type='text' name='userid' ></td></tr> <tr><td>Użytkownik: </td><td><input type='text' name='userid' ></td></tr>
<tr><td>Stanowisko: </td><td> <tr><td>Stanowisko: </td><td>
<select id="Stanowiska" name="title"> <select id="Stanowiska" name="title">
<?php $tit = ''; <?php $tit = '';
$w_tit = mysqli_fetch_array($wyn_tit); $w_tit = mysqli_fetch_array($wyn_tit);