本文整理汇总了PHP中Program::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Program::search方法的具体用法?PHP Program::search怎么用?PHP Program::search使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Program
的用法示例。
在下文中一共展示了Program::search方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetId
public function testGetId()
{
$rows = Program::search('', array());
$row = current($rows);
$this->assertEquals('program', strtolower(get_class(Program::get($row['program_disc']))));
$this->assertFalse(Program::get('dummy'));
}
示例2: WEEKDAY
}
if (isset($_POST['weekofday'])) {
$weekofday = $_POST['weekofday'];
if ($weekofday != 7) {
$options .= " AND WEEKDAY(starttime) = '" . $weekofday . "'";
}
}
}
$options .= " ORDER BY starttime ASC LIMIT 100";
$do_keyword = 0;
if ($search != "" || $type != "*" || $category_disc !== false || $station != 0) {
$do_keyword = 1;
}
try {
$db = DB::conn();
$programs = Program::search($options, $args);
foreach ($programs as $key => $program) {
$channel = Channel::get($program['channel_disc']);
$programs[$key]['station_name'] = $channel->name;
}
} catch (Exception $e) {
throw $e;
}
try {
$k_category_name = "";
$categories = $db->rows('SELECT * FROM ' . Category::TABLE);
$first_category = array('id' => 0, 'name' => "すべて", 'selected' => $category_disc === false ? "selected" : "");
foreach ($categories as $key => $category) {
$categories[$key]['name'] = $category['name_jp'];
$categories[$key]['selected'] = $category['category_disc'] === $category_disc ? "selected" : "";
if ($category['category_disc'] === $category_disc) {