pa_pagination_get_total_pages (public, deprecated)

 pa_pagination_get_total_pages

Defined in packages/photo-album/tcl/photo-album-procs.tcl

Deprecated. Invoking this procedure generates a warning.

returns the total pages in a datasource defined by $sql The sql var must be defined at the calling level. Uplevel used so that any binde vars in query are defined

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) db_string db_string (public) parameter::get parameter::get (public) pa_pagination_get_total_pages pa_pagination_get_total_pages pa_pagination_get_total_pages->ad_log_deprecated pa_pagination_get_total_pages->db_string pa_pagination_get_total_pages->parameter::get

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc pa_pagination_get_total_pages
    uplevel {
    return [db_string get_total_pages "
    select 
    ceil(count(*) / [parameter::get -parameter ThumbnailsPerPage])
    from
    ($sql)
    "]
    }
Generic XQL file:
<fullquery name="pa_pagination_get_total_pages.get_total_pages">
    <querytext>
      
	select 
	ceil(count(*) / [parameter::get -parameter ThumbnailsPerPage])
	from
	($sql)
	
      </querytext>
</fullquery>
packages/photo-album/tcl/photo-album-procs.xql

PostgreSQL XQL file:
packages/photo-album/tcl/photo-album-procs-postgresql.xql

Oracle XQL file:
packages/photo-album/tcl/photo-album-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: