This commit is contained in:
mischa 2022-08-23 05:53:10 +00:00
parent 680f8dffe5
commit 258edc97f7
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ function generate_short($url, $mysqli) {
function find_short($hash, $mysqli) {
$hash = mysqli_real_escape_string($mysqli, $hash);
$result = mysqli_query($mysqli, "SELECT * FROM " . DB_TABLE . " WHERE id='$hash'") . "'");
$result = mysqli_query($mysqli, "SELECT * FROM " . DB_TABLE . " WHERE id='$hash'");
if ($row = mysqli_fetch_assoc($result)) {
$link = $row['url'];
mysqli_query($mysqli, "UPDATE " . DB_TABLE . " SET count='" . ($row['count'] + 1) . "' WHERE id='" . $row['id'] . "'");