remove the rest of the backticks from sql queries; replace with TQUOT const which is driver dependent

This commit is contained in:
zotlabs
2016-10-12 18:15:12 -07:00
parent 40bfce463d
commit 9bb847bb07
8 changed files with 141 additions and 132 deletions

View File

@@ -301,9 +301,9 @@ class Import extends \Zotlabs\Web\Controller {
dbesc_array($xchan);
$r = dbq("INSERT INTO xchan (`"
. implode("`, `", array_keys($xchan))
. "`) VALUES ('"
$r = dbq("INSERT INTO xchan (" . TQUOT
. implode(TQUOT . ", " . TQUOT, array_keys($xchan))
. TQUOT . ") VALUES ('"
. implode("', '", array_values($xchan))
. "')" );
@@ -387,9 +387,9 @@ class Import extends \Zotlabs\Web\Controller {
}
dbesc_array($abook);
$r = dbq("INSERT INTO abook (`"
. implode("`, `", array_keys($abook))
. "`) VALUES ('"
$r = dbq("INSERT INTO abook (" . TQUOT
. implode(TQUOT . ", " . TQUOT, array_keys($abook))
. TQUOT . ") VALUES ('"
. implode("', '", array_values($abook))
. "')" );
@@ -429,13 +429,13 @@ class Import extends \Zotlabs\Web\Controller {
unset($group['id']);
$group['uid'] = $channel['channel_id'];
dbesc_array($group);
$r = dbq("INSERT INTO groups (`"
. implode("`, `", array_keys($group))
. "`) VALUES ('"
$r = dbq("INSERT INTO groups (" . TQUOT
. implode(TQUOT . ", " . TQUOT, array_keys($group))
. TQUOT . ") VALUES ('"
. implode("', '", array_values($group))
. "')" );
}
$r = q("select * from `groups` where uid = %d",
$r = q("select * from groups where uid = %d",
intval($channel['channel_id'])
);
if($r) {
@@ -456,9 +456,9 @@ class Import extends \Zotlabs\Web\Controller {
$group_member['gid'] = $x['new'];
}
dbesc_array($group_member);
$r = dbq("INSERT INTO group_member (`"
. implode("`, `", array_keys($group_member))
. "`) VALUES ('"
$r = dbq("INSERT INTO group_member (" . TQUOT
. implode(TQUOT . ", " . TQUOT, array_keys($group_member))
. TQUOT . ") VALUES ('"
. implode("', '", array_values($group_member))
. "')" );
}