MattsBits
MattsBits

MattsBits

Count The Number Of Sub-pages On a Page In Oracle Portal  

by Matt Hawkins, 14/03/2011
Categories : Oracle

The following PLSQL code creates a database function that counts the number of sub-pages on a page (folder) in Oracle Portal. This function can then be called whenever a sub-page count is required.

create or replace
FUNCTION COUNT_PAGE_SUBPAGES(PPAGEID IN NUMBER) RETURN NUMBER AS 

  -- This function counts the number of subpages on a specified page.
  -- It returns the count or zero.

  intCount NUMBER;

BEGIN

  SELECT COUNT(ID) INTO intCount FROM WWPOB_PAGE$ WHERE PARENTID=PPAGEID;

  RETURN intCount;

EXCEPTION WHEN OTHERS THEN

  RETURN 0;

END COUNT_PAGE_SUBPAGES;

Author : Matt Hawkins  Last Edit By : Matt Hawkins
PHP Powered  MySQL Powered  Valid XHTML 1.0  Valid CSS  Firefox - Take Back The Web  EUKHost - Recommended Webhosting Solutions

MattHawkins CMS v3.0 - Copyright 2009-2017