|
楼主 |
发表于 2008-9-1 22:29:03
|
显示全部楼层
MODEL:
<?php
class books_model extends Model {
function __construct(){
parent::Model();
}
function get_books($num, $offset) {
$query = $this->db->get('web, $num, $offset);
return $query;
}
function get_books_typeid($id, $num, $offset) {
if(empty($num)){$num=1;};
// if(empty($offset)){$offset=1;};
// $query=$this->db->get_where('web_show',$id, $num, $offset);
$query = $this->db->query("select *from web where typeid= ".$id." limit ".$num.",".$offset);
return $query;
}
}
?> |
|