This commit is contained in:
3p01
2026-01-21 09:30:31 +01:00
parent f0ebb9cf18
commit e7018c7fea
7 changed files with 12 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

View File

@@ -0,0 +1,8 @@
<?php
$db = mysqli_connect('localhost', 'root', '', 'medica');
$query = "SELECT nazwa, cecha FROM abonamenty JOIN szczegolyabonamentu ON abonamenty.id = Abonamenty_id JOIN cechy ON cechy.id = Cechy_id WHERE abonamenty.id = 1;";
$result = mysqli_query($db, $query);
while ($row = mysqli_fetch_assoc($result)) {
echo $row['nazwa'] . " - " . $row['cecha'] . "<br>";
}
mysqli_close($db);

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

View File

@@ -0,0 +1,4 @@
SELECT nazwa,cena,opis from abonamenty;
SELECT ROUND(AVG(cena), 2) AS "Srednio_abonament" FROM abonamenty;
SELECT nazwa, cecha FROM abonamenty JOIN szczegolyabonamentu ON abonamenty.id = Abonamenty_id JOIN cechy ON cechy.id = Cechy_id WHERE abonamenty.id = 1;
SELECT nazwa, opis FROM abonamenty WHERE opis LIKE '%zdrowie%' OR opis LIKE '%opieką%';