/** * Delete entries * * @param array|string $where SQL WHERE clause(s) * @return int|string */ public function delete($id) { //check the integration TODO the views and resource check $model_production = new Production_Model_Activity(); if ($model_production->fetchHaveContactClient($id)) { // die("client company"); $this->inLitter("id =" . $id); return true; // die("esta contacto esta usado como contacto cliente de una actividad"); } if ($model_production->fetchHaveContactCompany($id)) { // die("own company"); $this->inLitter("id =" . $id); return true; // die("esta contacto esta usado como contacto propio de una actividad"); } // die("va borrar"); $table = $this->getTable(); $table->delete('id = ' . (int) $id); }