3 class sml_data_sources_cache_db extends mw_data{
5 public function source_cache_db(){
9 $sql = "SELECT * FROM #--sml_source_cache";
10 $rst = $sgbd->query($sql);
11 while($v_rst = $sgbd->fetch_assoc($rst)) $cache[$v_rst["id"]] = $v_rst;
12 $sgbd->free_result($rst);
20 public function source_cache_infos_db($url){
21 $sgbd = $this->sgbd();
22 $cache_infos = array();
24 $sql = "SELECT * FROM #--sml_source_cache WHERE url=".$this->eq($url);
25 $rst = $sgbd->query($sql);
26 if($v_rst = $sgbd->fetch_assoc($rst)) $cache_infos = $v_rst;
27 $sgbd->free_result($rst);
35 public function add_source_cache_db($url, $cache_index){
36 $sgbd = $this->sgbd();
39 "INSERT INTO #--sml_source_cache(url, id_source, last_update) VALUES"
42 .", '".date("Y-m-d H:i:s")."'"
52 public function del_source_cache_db($id_cache_data){
54 $sgbd = $this->sgbd();
56 $sql = "DELETE FROM #--sml_source_cache WHERE id=".$this->eq($id_cache_data);