Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Wyświetlenie zawartości tabeli auta
- */
- include('laczenie.php');
- $auta = mysqli_query($db,"SELECT auta.*,kolory.Kolor FROM auta INNER JOIN kolory ON auta.IdKolor=kolory.IdKoloru");
- $IleAut = mysqli_num_rows($auta);
- echo('<br /><br /><table border="1" width="400">');
- echo('<tr>
- <th>IdAuta</th>
- <th>Marka</th>
- <th>Model</th>
- <th>Cena</th>
- <th>Kolor</th>
- <th>Usuwanie</th>
- <th>Edycja</th>
- </tr>');
- for ($i=1; $i <= $IleAut; $i++)
- {
- $auto = mysqli_fetch_array($auta);
- echo('<tr>
- <td>'.$auto['IdAuta'].'</td>
- <td>'.$auto['Marka'].'</td>
- <td>'.$auto['Model'].'</td>
- <td>'.$auto['Cena'].'</td>
- <td>'.$auto['Kolor'].'</td>
- <td><a href="index.php?Wybor=4&&IdAuta='.$auto['IdAuta'].'">Usuń</a></td>
- <td><a href="index.php?Wybor=5&&IdAuta='.$auto['IdAuta'].'">Edytuj</a></td>
- </tr>');
- }
- echo('</table>');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement