mirror of https://github.com/helloxz/imgurl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
905 B
37 lines
905 B
6 years ago
|
<?php
|
||
|
class Insert extends CI_Model {
|
||
|
|
||
|
public function __construct()
|
||
|
{
|
||
|
parent::__construct();
|
||
|
// Your own constructor code
|
||
|
}
|
||
|
//插入到images表
|
||
|
public function images($datas){
|
||
|
|
||
|
if($this->db->insert('images', $datas)){
|
||
|
|
||
|
//如果插入成功返回ID
|
||
|
return $this->db->insert_id();
|
||
|
}
|
||
|
else{
|
||
|
return false;
|
||
|
exit;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
//插入到imginfo表
|
||
|
public function imginfo($datas){
|
||
|
if($this->db->insert('imginfo', $datas)){
|
||
|
|
||
|
//如果插入成功返回ID
|
||
|
return $this->db->insert_id();
|
||
|
}
|
||
|
else{
|
||
|
return false;
|
||
|
exit;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
?>
|