/** * 通过键名,删除一条记录 * @param string $optKey * @return integer */ public function removeByKey($optKey) { if (($optKey = trim($optKey)) === '') { return false; } $tableName = $this->getTblprefix() . TableNames::getOptions(); $sql = $this->getCommandBuilder()->createDelete($tableName, '`option_key` = ?'); $rowCount = $this->delete($sql, $optKey); return $rowCount; }