summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-29 07:04:57 +0100
committerRemi Collet <remi@remirepo.net>2017-11-29 07:04:57 +0100
commita12bf10ece0d698b2b6bd32b2e6d28b6ea368e72 (patch)
treeecceba424a1ae73d5fc0691fba4be321e39cc74c
parent4aa2eda32c67dd5579f1aee3d108b7577ca0798b (diff)
missing quote
-rw-r--r--all.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/all.php b/all.php
index 44bc6f4..ac0fa16 100644
--- a/all.php
+++ b/all.php
@@ -66,17 +66,17 @@ function report ($db)
$sql = sprintf(
"SELECT DISTINCT name
FROM rpm
- WHERE SUBSTRING(name,1,1)='%s'
+ WHERE SUBSTRING(name,1,1) = %s
ORDER BY name",
- substr($what, 1, 1)
+ $db->quote(substr($what, 1, 1))
);
} else {
$sql = sprintf(
"SELECT DISTINCT name
FROM acls
- WHERE owner='%s'
+ WHERE owner = %s
ORDER BY name",
- $what
+ $db->quote($what)
);
}
//echo "<p>SQL=$sql</p>";