public function add($boxid, $mac, $time, $status, $runtime) { $bean = new Boxs(); $bean->id = $boxid; $bean->mac = $mac; $bean->add_time = $time; $bean->status = $status; $bean->runtime = $runtime; return $bean->save(); }