diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-01-14 20:44:12 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2019-01-14 20:45:37 +0100 |
commit | 042f3f2622e1adbc7546cfa25a5d138486b99341 (patch) | |
tree | d3f56bc3205725635a5282b362221dd1a78c98ec /web/lib | |
parent | f1d109e9b6863d924d2cb20f83e41d7091d62e20 (diff) | |
download | aur-042f3f2622e1adbc7546cfa25a5d138486b99341.tar.gz aur-042f3f2622e1adbc7546cfa25a5d138486b99341.tar.xz |
Quote MySql 8.0 reserved keywords
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/aurjson.class.php | 6 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index c51e9c26..c275d214 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -284,10 +284,10 @@ class AurJSON { "LEFT JOIN RelationTypes " . "ON RelationTypes.ID = PackageRelations.RelTypeID " . "WHERE PackageRelations.PackageID = " . $pkgid . " " . - "UNION SELECT 'groups' AS Type, Groups.Name, '' AS Cond " . - "FROM Groups INNER JOIN PackageGroups " . + "UNION SELECT 'groups' AS Type, `Groups`.`Name`, '' AS Cond " . + "FROM `Groups` INNER JOIN PackageGroups " . "ON PackageGroups.PackageID = " . $pkgid . " " . - "AND PackageGroups.GroupID = Groups.ID " . + "AND PackageGroups.GroupID = `Groups`.ID " . "UNION SELECT 'license' AS Type, Licenses.Name, '' AS Cond " . "FROM Licenses INNER JOIN PackageLicenses " . "ON PackageLicenses.PackageID = " . $pkgid . " " . diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index ced1f8e2..00f0cc45 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -188,7 +188,7 @@ function pkg_groups($pkgid) { $pkgid = intval($pkgid); if ($pkgid > 0) { $dbh = DB::connect(); - $q = "SELECT g.Name FROM Groups g "; + $q = "SELECT g.Name FROM `Groups` g "; $q.= "INNER JOIN PackageGroups pg ON pg.GroupID = g.ID "; $q.= "WHERE pg.PackageID = ". $pkgid; $result = $dbh->query($q); |