Skip to content

Instantly share code, notes, and snippets.

View krez69's full-sized avatar
🏠
Working from home

Walid krez69

🏠
Working from home
View GitHub Profile
http://zupimages.net/viewer.php?id=19/39/ip6a.jpg
mysql> show tables;
+-------------------------+
| Tables_in_wild_db_quest |
+-------------------------+
| school |
| wizard |
+-------------------------+
2 rows in set (0.00 sec)
mysql> DESCRIBE wizard;
1ER REQUETE
mysql> SELECT *
-> FROM `wizard`
-> WHERE birthday
-> BETWEEN '1975-01-01' AND '1985-01-01';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
//Requete d'insertion
mysql> INSERT INTO school (name, country, capacity) VALUES ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 400), ('Ilvermorny School of Witchcraft and Wizardry' , 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350);
mysql> SELECT * FROM school;
+----+----------------------------------------------+----------+----------------+
| id | name | capacity | country |
+----+----------------------------------------------+----------+----------------+
| 1 | Beauxbatons Academy of Magic | 550 | France |
http://zupimages.net/viewer.php?id=19/40/4zlj.jpg
http://zupimages.net/viewer.php?id=19/40/dk33.jpg
http://zupimages.net/viewer.php?id=19/40/bns5.jpg
@krez69
krez69 / congratulation.php
Last active October 6, 2019 19:47
formulaire avec redirection après validation
<?php
echo "Merci à bientot";
<?php
require_once 'connec.php';
$pdo = new \PDO (DSN, USER, PASS);
$query = "SELECT * FROM friend";
$statement = $pdo->query($query);
$friends = $statement->fetchAll();
foreach ($friends as $friend) {
<?php
// Bicycle.php
class Bicycle
{
/**
* @var string
*/
private $color;
<?php
require_once 'connect.php';
$pdo = new \PDO (DSN, USER, PASS);
//Recuperer les élements du tableaux bribe
$query = "SELECT * FROM bribe";
$statement = $pdo->query($query);
$bribes = $statement->fetchAll(PDO::FETCH_ASSOC);
<?php
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">