This commit is contained in:
2023-01-13 00:27:12 +01:00
parent 06849fe684
commit 920ad6ffdb
5 changed files with 82 additions and 3 deletions

View File

@ -97,8 +97,15 @@ try {
$conn = $db_connection->dbConnection();
// echo var_dump($conn);
// Insert image file name into database
$statement = $conn->prepare("UPDATE dogs SET picture = :filePic WHERE qr_id = :user_qr_id");
$update = $statement->execute(array('filePic' => $newPathFilename, 'user_qr_id' => $user["qr_id"]));
if(isset($_POST["qr"]))
{
$statement = $conn->prepare("UPDATE dogs SET qr_code = :filePath WHERE qr_id = :user_qr_id");
}
else
{
$statement = $conn->prepare("UPDATE dogs SET picture = :filePath WHERE qr_id = :user_qr_id");
}
$update = $statement->execute(array('filePath' => $newPathFilename, 'user_qr_id' => $user["qr_id"]));
// echo var_dump($update);
$count = $statement->rowCount();
// echo 'rowcount ' . $count . '\n';