Now we have less than 100 insert commands, yeah
This commit is contained in:
parent
c6b04aa922
commit
03b86d3766
6 changed files with 14 additions and 40 deletions
|
@ -717,7 +717,7 @@ class App {
|
|||
|
||||
$r = q('SELECT `pid` FROM `process` WHERE `pid` = %d', intval(getmypid()));
|
||||
if (!dbm::is_result($r)) {
|
||||
q("INSERT INTO `process` (`pid`,`command`,`created`) VALUES (%d, '%s', '%s')", intval(getmypid()), dbesc($command), dbesc(datetime_convert()));
|
||||
dba::insert('process', array('pid' => getmypid(), 'command' => $command, 'created' => datetime_convert()));
|
||||
}
|
||||
dba::commit();
|
||||
}
|
||||
|
|
|
@ -66,11 +66,9 @@ class ParseUrl {
|
|||
|
||||
$data = self::getSiteinfo($url, $no_guessing, $do_oembed);
|
||||
|
||||
q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`, `created`) VALUES ('%s', %d, %d, '%s', '%s')
|
||||
ON DUPLICATE KEY UPDATE `content` = '%s', `created` = '%s'",
|
||||
dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed),
|
||||
dbesc(serialize($data)), dbesc(datetime_convert()),
|
||||
dbesc(serialize($data)), dbesc(datetime_convert()));
|
||||
dba::insert('parsed_url', array('url' => normalise_link($url), 'guessing' => !$no_guessing,
|
||||
'oembed' => $do_oembed, 'content' => serialize($data),
|
||||
'created' => datetime_convert()), true);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue