xo::db::CrClass proc get_parent_id (public)

 xo::db::CrClass[i] get_parent_id -item_id item_id 

Defined in /var/www/openacs.org/packages/xotcl-core/tcl/cr-procs.tcl

Get the parent_id of a content item either from an already instantiated object or from the database without instantiating it. If item_id is not a valid item_id, we throw an error.

Switches:
-item_id (required)
Returns:
parent_id

Testcases:
xowiki_test_cases
Source code:
# TODO: the following line is deactivated, until we get rid of the "folder object" in xowiki
#if {[nsf::is object ::$item_id]} {return [::$item_id parent_id]}
::xo::dc 1row -prepare integer get_parent "select parent_id from cr_items where item_id = :item_id"
return $parent_id
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: