`pc_detected_type` varchar(16) NOT NULL,
PRIMARY KEY (`pc_id`),
UNIQUE KEY `pc_id` (`pc_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `pingbacks` (
CREATE TABLE `rbookmarks` (
`rb_id` int(11) NOT NULL AUTO_INCREMENT,
+ `rb_p_id` int(11) NOT NULL,
`rb_pc_id` int(11) NOT NULL,
`rb_target` varchar(2048) NOT NULL,
`rb_source` varchar(2048) NOT NULL,
CREATE TABLE `rcomments` (
`rc_id` int(11) NOT NULL AUTO_INCREMENT,
+ `rc_p_id` int(11) NOT NULL,
`rc_pc_id` int(11) NOT NULL,
`rc_target` varchar(2048) NOT NULL,
`rc_source` varchar(2048) NOT NULL,
CREATE TABLE `rlinks` (
`rl_id` int(11) NOT NULL AUTO_INCREMENT,
+ `rl_p_id` int(11) NOT NULL,
`rl_pc_id` int(11) NOT NULL,
`rl_target` varchar(2048) NOT NULL,
`rl_source` varchar(2048) NOT NULL,
`rl_author_image` varchar(2048) NOT NULL,
PRIMARY KEY (`rl_id`),
UNIQUE KEY `rb_id` (`rl_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bookmarks, extracted from pingbackcontent';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bookmarks, extracted from pingbackcontent';
var_dump($data);
$this->db->exec(
'INSERT INTO rcomments SET'
- . ' rc_pc_id = ' . $this->db->quote($contentRow->pc_id)
+ . ' rc_p_id = ' . $this->db->quote($contentRow->p_id)
+ . ', rc_pc_id = ' . $this->db->quote($contentRow->pc_id)
. ', rc_source = ' . $this->db->quote($contentRow->p_source)
. ', rc_target = ' . $this->db->quote($contentRow->p_target)
. ', rc_title = ' . $this->db->quote($data['title'])
$this->log->info('Link found');
$this->db->exec(
'INSERT INTO rlinks SET'
- . ' rl_pc_id = ' . $this->db->quote($contentRow->pc_id)
+ . ' rl_p_id = ' . $this->db->quote($contentRow->p_id)
+ . ', rl_pc_id = ' . $this->db->quote($contentRow->pc_id)
. ', rl_source = ' . $this->db->quote($contentRow->p_source)
. ', rl_target = ' . $this->db->quote($contentRow->p_target)
. ', rl_title = ' . $this->db->quote($data['title'])
return;
}
- $this->db->exec(
- 'DELETE FROM pingbackcontent WHERE'
- . ' pc_p_id = ' . $this->db->quote($pingbackRow->p_id)
- );
+ $qPid = $this->db->quote($pingbackRow->p_id);
+ $this->db->exec('DELETE FROM pingbackcontent WHERE pc_p_id = ' . $qPid);
+ $this->db->exec('DELETE FROM rbookmarks WHERE rb_p_id = ' . $qPid);
+ $this->db->exec('DELETE FROM rcomments WHERE rc_p_id = ' . $qPid);
+ $this->db->exec('DELETE FROM rlinks WHERE rl_p_id = ' . $qPid);
+
$this->db->exec(
'INSERT INTO pingbackcontent SET'
- . ' pc_p_id = ' . $this->db->quote($pingbackRow->p_id)
+ . ' pc_p_id = ' . $qPid
. ', pc_mime_type = '
. $this->db->quote($res->getHeader('content-type'))
. ', pc_fulltext = ' . $this->db->quote($res->getBody())