public static int getCategoryIdByName(String categoryName)
	{
		ResultSet rs=null;
		Connection con=null;
		PreparedStatement ps=null;
		int result=0;
		try{
			String sql="SELECT CATEGORYID FROM CATEGORY WHERE CATEGORY_NAME=?";
			con=ConnectionPool.getConnectionFromPool();
			ps=con.prepareStatement(sql);
			ps.setString(1, categoryName);
			rs=ps.executeQuery();
			if(rs.next())
			{
				result = rs.getInt("CATEGORYID");
			}
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		finally{
			if(rs!=null)
			{
				try {
					rs.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			if(ps!=null)
			{
				try {
					ps.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if(con!=null)
			{
				try {
					ConnectionPool.addConnectionBackToPool(con);;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
		return result;
	}