22.01
This commit is contained in:
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/import.png
Normal file
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/import.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 344 KiB |
9
Egzamin/inf_03_2025_06_11_php_opony_BAZA/index.php
Normal file
9
Egzamin/inf_03_2025_06_11_php_opony_BAZA/index.php
Normal 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);
|
||||||
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw1.png
Normal file
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 385 KiB |
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw2.png
Normal file
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 360 KiB |
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw3.png
Normal file
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 363 KiB |
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw4.png
Normal file
BIN
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kw4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 315 KiB |
4
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kwerendy.txt
Normal file
4
Egzamin/inf_03_2025_06_11_php_opony_BAZA/kwerendy.txt
Normal 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';
|
||||||
Reference in New Issue
Block a user