X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fapp%2Fdata%2Fmw_sgbd.php;fp=mw%2Fapp%2Fdata%2Fmw_sgbd.php;h=faf88e22cb90d63722be1fe2391086bbb4398df9;hb=422d883e3ed8ee55ee41e3b7826f32b79cea646d;hp=8c30d951ba22cd764e5ec86b2bdb939ccad9f016;hpb=e1b64e4088232b9d7b4acb2dc24279bb38fcafba;p=mtweb diff --git a/mw/app/data/mw_sgbd.php b/mw/app/data/mw_sgbd.php index 8c30d95..faf88e2 100644 --- a/mw/app/data/mw_sgbd.php +++ b/mw/app/data/mw_sgbd.php @@ -26,7 +26,17 @@ # SQL # + function desc_table($table_name){ + if(!method_exists($this->sgbd_impl, "desc_table")) return false; + return $this->sgbd_impl->desc_table( + ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? + str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $table_name) + : $table_name + ); + } + function table_exists($table_name){ + if(!method_exists($this->sgbd_impl, "table_exists")) return false; return $this->sgbd_impl->table_exists( ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $table_name) @@ -35,6 +45,7 @@ } function field_exists($table_name, $field_name){ + if(!method_exists($this->sgbd_impl, "field_exists")) return false; return $this->sgbd_impl->field_exists( ( $prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? @@ -42,10 +53,10 @@ : $table_name, $field_name ); - } function query($sql){ + if(!method_exists($this->sgbd_impl, "query")) return false; return $this->sgbd_impl->query( ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $sql) @@ -54,18 +65,22 @@ } function insert_id(){ + if(!method_exists($this->sgbd_impl, "insert_id")) return false; return $this->sgbd_impl->insert_id(); } function fetch_assoc($rst){ + if(!method_exists($this->sgbd_impl, "fetch_assoc")) return false; return $this->sgbd_impl->fetch_assoc($rst); } function free_result($rst){ + if(!method_exists($this->sgbd_impl, "")) return false; return $this->sgbd_impl->free_result($rst); } function close(){ + if(!method_exists($this->sgbd_impl, "")) return false; return $this->sgbd_impl->close(); } @@ -74,46 +89,57 @@ # function data_exists($data_path){ + if(!method_exists($this->sgbd_impl, "data_exists")) return false; return $this->sgbd_impl->data_exists($data_path); } function create_data($data_path){ + if(!method_exists($this->sgbd_impl, "create_data")) return false; return $this->sgbd_impl->create_data($data_path); } function get_data($data_path, $data_id){ + if(!method_exists($this->sgbd_impl, "get_data")) return false; return $this->sgbd_impl->get_data($data_path, $data_id); } function open_data($data_path, $FETCH = true){ + if(!method_exists($this->sgbd_impl, "open_data")) return false; return $this->sgbd_impl->open_data($data_path, $FETCH); } function fetch_data($dh){ + if(!method_exists($this->sgbd_impl, "fetch_data")) return false; return $this->sgbd_impl->fetch_data($dh); } function add_data($data_path, $data){ + if(!method_exists($this->sgbd_impl, "add_data")) return false; return $this->sgbd_impl->add_data($data_path, $data); } function last_index($dh){ + if(!method_exists($this->sgbd_impl, "last_index")) return false; return $this->sgbd_impl->last_index($dh); } function set_data($data_path, $data_id, $data){ + if(!method_exists($this->sgbd_impl, "set_data")) return false; return $this->sgbd_impl->set_data($data_path, $data_id, $data); } function del_data($data_path, $data_id){ + if(!method_exists($this->sgbd_impl, "del_data")) return false; return $this->sgbd_impl->del_data($data_path, $data_id); } function close_data($dh){ + if(!method_exists($this->sgbd_impl, "close_data")) return false; return $this->sgbd_impl->close_data($dh); } function remove_data($data_path){ + if(!method_exists($this->sgbd_impl, "remove_data")) return false; return $this->sgbd_impl->remove_data($data_path); }