public function send($content) { $sql = "INSERT INTO `wx_message` (`openid`, `content`, `type`) VALUES ('{$this->openid}', '{$content}', 'snd')"; $this->insert($sql); $sql = "UPDATE `wx_message` SET `type` = 'reply' WHERE `openid` = '{$this->openid}' AND `time` = '{$this->time}' AND `type` = 'rcv'"; $this->update($sql); $custom = new Custom($this->openid); return $custom->send($content); }