summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/upload.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/static/upload.php b/static/upload.php
index 655dd9c..edae4f8 100644
--- a/static/upload.php
+++ b/static/upload.php
@@ -80,8 +80,8 @@ function generate_name($file)
}
// Check if a file with the same name does already exist in the database
- $q = $db->prepare('SELECT COUNT(name) FROM pomf WHERE name = (:name)');
- $q->bindValue(':name', $name, PDO::PARAM_STR);
+ $q = $db->prepare('SELECT COUNT(filename) FROM pomf WHERE filename = (:filename)');
+ $q->bindValue(':filename', $name, PDO::PARAM_STR);
$q->execute();
$result = $q->fetchColumn();
// If it does, generate a new name