From 24d088d43be7cc03a0975360d7542b578c48369f Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 12 May 2013 09:40:54 -0600 Subject: mysql 5.1 chokes on 'select * from group' since group is a keyword --- mod/import.php | 4 ++-- mod/lockview.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/import.php b/mod/import.php index 4602c8aa8..9443f5c60 100644 --- a/mod/import.php +++ b/mod/import.php @@ -279,7 +279,7 @@ function import_post(&$a) { . implode("', '", array_values($group)) . "')" ); } - $r = q("select * from group where uid = %d", + $r = q("select * from `group` where uid = %d", intval($channel['channel_id']) ); if($r) { @@ -341,4 +341,4 @@ function import_content(&$a) { return $o; -} \ No newline at end of file +} diff --git a/mod/lockview.php b/mod/lockview.php index 01a6997ee..7dda85623 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -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[] = '' . $rr['name'] . ''; @@ -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[] = '' . $rr['name'] . ''; -- cgit v1.2.3