这是我在codeigniter中的代码
模型中
$where = "is_display ='Yes' AND start_date < '{$current_time}' AND end_date >
'{$current_time}' AND status = 'Live' AND id NOT IN (SELECT id FROM (emts_auction)
WHERE is_display = 'Yes' AND quantity =1 AND sold_qty >0
AND last_auc_ending_time < '{$current_time}')";
$this->db->select('*');
$this->db->from('auction');
$this->db->where($where);
$this->db->order_by("id", "desc");
$query = $this->db->get();
$data = $query->result();
$query->free_result();
return $data;
可见
<?php foreach($auction_view as $auction)
{
echo $auction->name;
echo $auction->price;
echo $auction->bid_fee;
}
?>