[PHP-NOTES] note 130201 added to language.basic-syntax

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
// GET Parameter auslesen
$id = $_GET['id'];

// prepared Statement bei Usereingabe! (Vermeidung von SQL-Injections)
$stmt = $conn->prepare("SELECT * FROM products WHERE productCode = :id"); // Statement mit Platzhalter
$stmt->bindParam(':id', $id);                                             // Platzhalter mit Wert befüllen
$stmt->execute();                                                         // Query ausführen

// alle Daten mit 'fetch' fetchen -> Ergebnis ist ein 1-dimensionales Array mit einem Datensatz
$result = $stmt->fetch(PDO::FETCH_ASSOC);
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 193.170.70.27)
----
Manual Page -- https://php.net/manual/en/language.basic-syntax.php
Edit        -- https://main.php.net/note/edit/130201
Del: integrated  -- https://main.php.net/note/delete/130201/integrated
Del: useless     -- https://main.php.net/note/delete/130201/useless
Del: bad code    -- https://main.php.net/note/delete/130201/bad+code
Del: spam        -- https://main.php.net/note/delete/130201/spam
Del: non-english -- https://main.php.net/note/delete/130201/non-english
Del: in docs     -- https://main.php.net/note/delete/130201/in+docs
Del: other reasons-- https://main.php.net/note/delete/130201
Reject      -- https://main.php.net/note/reject/130201
Search      -- https://main.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.