Difference between revisions of "Get programs"
From TMM Wiki
Jump to navigationJump to searchm |
(No difference)
|
Latest revision as of 11:13, 18 December 2008
get_programs
Retrieve programs available for a specified login
- array get_programs(integer loginid[[[, bool loop=FALSE], bool detailed=FALSE], bool hidden=FALSE])
Retrieves an array of all programs the member with this loginid can access. The loop parameter determines how the array is built; the detailed parameter determines how much info about each program to include; the hidden parameter determines if hidden programs are added or not.
Output
If loop is FALSE, get_programs returns an array in the following form.
{ programid => "Program Name [Payout]" ... }
If loop is TRUE but detailed is FALSE, get_programs returns an array in the following form.
{ 0 => { 'id' => programid, 'name' => "Program Name [Payout]" } ... }
If loop is TRUE and detailed is TRUE, get_programs returns an array in the following form.
{ 0 => { 'id' => programid, 'name' => "Program Name [Payout]", ... all other fields from programs table ... } ... }