예제 #1
0
파일: search.php 프로젝트: bmchun/sunset
 function search_admin($key, $type, $page)
 {
     $string = "`id` LIKE '%{$key}%' || `describe` LIKE '%{$key}%' ORDER BY `id`";
     $num = 50;
     $limit = ($page - 1) * $num;
     $limit .= ',' . $num;
     $re = new ItemInfo();
     $data = $re->iteminfo_select_like($string, $limit);
     return $data;
 }
예제 #2
0
<?php

require_once '/var/www/git/application/models/NewItems.php';
//获取商品信息为空的
$items = new NewItems();
$it = new ItemInfo();
$string = '`end_time` is  NOT NULL';
$limit = 1000;
$result = $it->iteminfo_select_like($string, $limit);
while ($r = mysql_fetch_array($result, true)) {
    $endTime = $r['end_time'] / 1000;
    //获取字符串
    $startTime = time();
    if ($startTime >= $endTime) {
        $items->itemDel($r['id']);
    }
}