mirror of
https://github.com/FlyInTheBox/31TSAI.git
synced 2024-11-09 20:44:11 +01:00
28 lines
781 B
PHP
28 lines
781 B
PHP
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="description"
|
||
|
content="Wylazowski Klasa 5D2">
|
||
|
<title>Strona Główna</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h2 align="center">Baza danych Wylazowski, Klasa 5D2</h2>
|
||
|
<h3 align="center">Tu wstawiamy nasz kod</h3>
|
||
|
<?php
|
||
|
$conn = mysqli_connect('localhost','root','','baza_testowa');
|
||
|
$query = "SELECT emp.id,
|
||
|
emp.first_name,
|
||
|
emp.last_name
|
||
|
FROM emp
|
||
|
WHERE emp.last_name LIKE 'n%';";
|
||
|
$result = mysqli_query($conn, $query);
|
||
|
while ($row = mysqli_fetch_array($result))
|
||
|
{
|
||
|
printf("%d", $row['id']);
|
||
|
printf("%s", $row['last_name']);
|
||
|
printf("%s", $row['first_name']);
|
||
|
}
|
||
|
?>
|
||
|
</body>
|
||
|
</html>
|