Now we have less than 100 insert commands, yeah

This commit is contained in:
Michael
2017-08-09 23:02:57 +00:00
parent c6b04aa922
commit 03b86d3766
6 changed files with 14 additions and 40 deletions
+2 -11
View File
@@ -26,11 +26,7 @@ function group_add($uid,$name) {
}
return true;
}
$r = q("INSERT INTO `group` ( `uid`, `name` )
VALUES( %d, '%s' ) ",
intval($uid),
dbesc($name)
);
$r = dba::insert('group', array('uid' => $uid, 'name' => $name));
$ret = $r;
}
return $ret;
@@ -144,12 +140,7 @@ function group_add_member($uid,$name,$member,$gid = 0) {
// we indicate success because the group member was in fact created
// -- It was just created at another time
if (! dbm::is_result($r)) {
$r = q("INSERT INTO `group_member` (`uid`, `gid`, `contact-id`)
VALUES( %d, %d, %d ) ",
intval($uid),
intval($gid),
intval($member)
);
$r = dba::insert('group_member', array('uid' => $uid, 'gid' => $gid, 'contact-id' => $member));
}
return $r;
}