public List<Client> searchClient(String usernameOrName) {
		Connection conn=null;
		try{
			conn = dbConnector.getConnection();
			if (conn==null) //cannot connect to DB
				return null;
			
			Statement st;
			ResultSet rs;
			String sql;
			
			boolean searchAll = false;
			if (usernameOrName==null )
				searchAll=true;
			
			usernameOrName = usernameOrName.trim();
			if (usernameOrName.isEmpty())
				searchAll=true;
			
			if (searchAll) {
				sql = "select * from tbClient";
			} else {
				sql = "select * from tbClient where "
						+ " username LIKE '%"+usernameOrName+"%' "
						+ " OR fname LIKE '%"+usernameOrName+"%' "
						+ " OR lname LIKE '%"+usernameOrName+"%' ";
			}
			
			// check does this client's username exist?
			st = conn.createStatement();
			rs = st.executeQuery(sql);
			
			List<Client> lst = new ArrayList<Client>();
			// if exist, return the Client objects
			while (rs.next()){
				Client client = getClientFromResultSet(rs);
				lst.add(client);
			}
			if (lst.size()<=0)
				return null;
			else
				return lst;
		}
		catch(Exception e){
			e.printStackTrace();
		}finally {
			try {
				if (conn!=null)
					conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		
		return null;
		
	}