mysql 5.1 chokes on 'select * from group' since group is a keyword

This commit is contained in:
Zach Prezkuta
2013-05-12 09:40:54 -06:00
parent 8a1c8c4a03
commit 24d088d43b
3 changed files with 6 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ function lockview_content(&$a) {
stringify_array_elms($deny_users,true);
if(count($allowed_groups)) {
$r = q("SELECT name FROM group WHERE hash IN ( " . implode(', ', $allowed_groups) . " )");
$r = q("SELECT name FROM `group` WHERE hash IN ( " . implode(', ', $allowed_groups) . " )");
if($r)
foreach($r as $rr)
$l[] = '<b>' . $rr['name'] . '</b>';
@@ -61,7 +61,7 @@ function lockview_content(&$a) {
$l[] = $rr['xchan_name'];
}
if(count($deny_groups)) {
$r = q("SELECT name FROM group WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
$r = q("SELECT name FROM `group` WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
if($r)
foreach($r as $rr)
$l[] = '<b><strike>' . $rr['name'] . '</strike></b>';