note 127953 added to pdo.prepare
| From: | shawn dot s at examplemail dot com | Date: | Tue, 22 Nov 2022 21:31:26 +0000 |
| Subject: | note 127953 added to pdo.prepare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219908@lists.php.net to get a copy of this message | ||
class photoModel extends Database
{
public function writePhotoData($values) {
$guid = $this->createUUID();
$sql = "INSERT INTO photo(id, userid, title, filename, categoryid, description) VALUES
(:guid, :userid,
:title, :filename, :categoryid, :description);";
$pdo = $this->linkDB();
try {
$sth = $pdo->prepare($sql);
$sth->execute([":guid" => $guid,
//":userid" => $_POST["userid"],
":title" => $values["title"],
":filename" => $values["filename"],
":categoryid" => $values["categoryid"],
":description" => $values["description"]]);
} catch (PDOException $e) {
new ErrorMsg("Fehler beim Schreiben der Daten.");
die;
}
return true;
}
}
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.161 (proxied: 185.231.255.224)
----
Manual Page -- https://php.net/manual/en/pdo.prepare.php
Edit -- https://main.php.net/note/edit/127953
Del: integrated -- https://main.php.net/note/delete/127953/integrated
Del: useless -- https://main.php.net/note/delete/127953/useless
Del: bad code -- https://main.php.net/note/delete/127953/bad+code
Del: spam -- https://main.php.net/note/delete/127953/spam
Del: non-english -- https://main.php.net/note/delete/127953/non-english
Del: in docs -- https://main.php.net/note/delete/127953/in+docs
Del: other reasons-- https://main.php.net/note/delete/127953
Reject -- https://main.php.net/note/reject/127953
Search -- https://main.php.net/manage/user-notes.php