当前位置: 首页>>代码示例>>PHP>>正文


PHP Program::search方法代码示例

本文整理汇总了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'));
 }
开发者ID:ha1t,项目名称:epgrec,代码行数:7,代码来源:ProgramTest.php

示例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) {
开发者ID:ha1t,项目名称:epgrec,代码行数:31,代码来源:search.php


注:本文中的Program::search方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。