public String findQuery(String table, String name, String id, String att) {
		if (att == "") {
			att = "*";
		}
		String query = "SELECT " + att + " FROM " + table + " WHERE ";
		if (notNorE(name) && notNorE(id)) {
			if (table.toLowerCase().equals("security")) {
				query += "s";
			} else if (table.toLowerCase().equals("prisoner")) {
				query += "p";
			}
			query += "name LIKE '%" + name + "%' AND ";
			if (table.toLowerCase().equals("security")) {
				query += "s";
			} else if (table.toLowerCase().equals("prisoner")) {
				query += "p";
			}
			query += "id = " + id;
		} else if (notNorE(name)) {
			if (table.toLowerCase().equals("security")) {
				query += "s";
			} else if (table.toLowerCase().equals("prisoner")) {
				query += "p";
			}
			query += "name LIKE '%" + name + "%'";
		} else if (notNorE(id)) {
			if (table.toLowerCase().equals("security")) {
				query += "s";
			} else if (table.toLowerCase().equals("prisoner")) {
				query += "p";
			}
			query += "id = " + id;
		} else {
			return error;
		}

		return sendQuery(query);
	}