function eliminaCliente($cod) { $cliente = new Utente(); $query = "SELECT * FROM utente WHERE codiceFiscale='{$cod}' and tipo='cliente'"; $this->database->query($query); $res = $this->database->result; $riga = mysql_fetch_array($res); if (isset($riga[0])) { $cliente->delete($cod); return 1; } else { return 0; } }