public int userID(String login, String pwd)
	{
		int r = -1;
		Statement st = null;
		ResultSet result = null;
		
		try 
		{
			st = cnx();
			if(st == null) return -1;
			result = (ResultSet) st.executeQuery("SELECT id FROM t_users WHERE (name='"+login+"' AND password='"+pwd+"')");
			if(result.last() && result.getRow() == 1) r = result.getInt("id");
			result.close();
			st.close();
		} catch (SQLException e) 
		{
			e.printStackTrace();
		}		
		
		return r;
	}