- q("INSERT INTO `notify` (`hash`, `name`, `url`, `photo`, `date`, `uid`, `link`, `iid`, `parent`, `type`, `verb`, `otype`, `name_cache`)
- values('%s', '%s', '%s', '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s')",
- dbesc($datarray['hash']),
- dbesc($datarray['name']),
- dbesc($datarray['url']),
- dbesc($datarray['photo']),
- dbesc($datarray['date']),
- intval($datarray['uid']),
- dbesc($datarray['link']),
- intval($datarray['iid']),
- intval($datarray['parent']),
- intval($datarray['type']),
- dbesc($datarray['verb']),
- dbesc($datarray['otype']),
- dbesc($datarray["name_cache"])
- );
+ $fields = ['hash' => $datarray['hash'], 'name' => $datarray['name'], 'url' => $datarray['url'],
+ 'photo' => $datarray['photo'], 'date' => $datarray['date'], 'uid' => $datarray['uid'],
+ 'link' => $datarray['link'], 'iid' => $datarray['iid'], 'parent' => $datarray['parent'],
+ 'type' => $datarray['type'], 'verb' => $datarray['verb'], 'otype' => $datarray['otype'],
+ 'name_cache' => $datarray["name_cache"]];
+ DBA::insert('notify', $fields);