/** * 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_Production(); if ($model_production->fetchHaveCompanyClient($id) != null) { die("esta compañia esta trabajando como cliente de una produccion"); } $model_contact = new Company_Model_Contact(); if ($model_contact->fetchHaveCompanyContact($id)) { die("esta compañia tiene contactos asociaodos"); } //delete resource $table = $this->getTable(); $table->delete('id = ' . (int) $id); }