示例#1
0
文件: db.php 项目: p-mob2015/idea19
function fetchChoicesWithName($comboName)
{
    /*
    Fetch choices info from the database given the combo name
    PARAM:
    # comboName - name of the combo for which the choices are to be fetched
    RESULT:
    # array of ComboChoice objects
    */
    try {
        $a = Combochoice::find("all", array("conditions" => array("tblcombo.nameCombo=?", $comboName), "joins" => array("combo")));
    } catch (Exception $e) {
        echo 'Caught exception: ', $e->getMessage(), "\n";
    }
    return $a;
}