conn = $db; } // Method to fetch bank details for a given empid public function fetch_bank_details_by_empid($empid) { // Query to fetch bank details for the given empid $query = "SELECT * FROM " . $this->table_name . " WHERE empid = :empid"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':empid', $empid); $stmt->execute(); // Fetch the bank details as an associative array $bankDetails = $stmt->fetch(PDO::FETCH_ASSOC); return $bankDetails; } // Method to check if the given esino exists public function check_esino_exists($esino) { // Query to check if the esino exists in the database $query = "SELECT COUNT(*) FROM " . $this->table_name . " WHERE esino = :esino"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':esino', $esino); $stmt->execute(); // Fetch the count of matching records $count = $stmt->fetchColumn(); // Return true if the esino exists, otherwise false return $count > 0; } // Method to check if the given esino exists public function check_epfno_exists($epfno) { // Query to check if the esino exists in the database $query = "SELECT COUNT(*) FROM " . $this->table_name . " WHERE epfno = :epfno"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':epfno', $epfno); $stmt->execute(); // Fetch the count of matching records $count = $stmt->fetchColumn(); // Return true if the esino exists, otherwise false return $count > 0; } }