This commit is contained in:
3p01
2026-01-22 09:24:00 +01:00
parent e7018c7fea
commit eb5c4f6652
7 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

View File

@@ -0,0 +1,9 @@
<?php
$db = mysqli_connect('localhost', 'root', '', 'opony');
$query = "SELECT id_zam, ilosc, model, cena FROM zamowienie JOIN opony USING(nr_kat) ORDER BY RAND() LIMIT 1;";
$result = mysqli_query($db, $query);
while ($row = mysqli_fetch_assoc($result)) {
echo $row['id_zam'] . " - " . $row['ilosc'] . " - " . $row['model'] . " - " . $row['cena'] . "<br>";
}
mysqli_close($db);

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View File

@@ -0,0 +1,4 @@
SELECT * FROM opony ORDER BY cena LIMIT 10;
SELECT producent, model, sezon, cena FROM opony WHERE nr_kat = 9;
SELECT id_zam, ilosc, model, cena FROM zamowienie JOIN opony USING(nr_kat) ORDER BY RAND() LIMIT 1;
UPDATE opony SET cena = cena * 0.75 WHERE sezon = 'letnia';