public function testSfArrKeyValue_キーサイズが短い場合_キーサイズでカットされる()
 {
     $len_max = 5;
     $keysize = 1;
     $this->expected = array('1...' => '2001', '2...' => '2002', '3...' => '2003', '4...' => '2004');
     $this->actual = SC_Utils::sfArrKeyValue($this->arrList, $this->keyname, $this->valuename, $len_max, $keysize);
     $this->verify();
 }
Beispiel #2
0
 function sfGetClassCatCount()
 {
     $sql = "select count(dtb_class.class_id) as count, dtb_class.class_id ";
     $sql .= "from dtb_class inner join dtb_classcategory on dtb_class.class_id = dtb_classcategory.class_id ";
     $sql .= "where dtb_class.del_flg = 0 AND dtb_classcategory.del_flg = 0 ";
     $sql .= "group by dtb_class.class_id, dtb_class.name";
     $objQuery = new SC_Query();
     $arrList = $objQuery->getall($sql);
     // キーと値をセットした配列を取得
     $arrRet = SC_Utils::sfArrKeyValue($arrList, 'class_id', 'count');
     return $arrRet;
 }