8 function mw_sgbd($sgbd_impl, $env){
9 $this->sgbd_impl = $sgbd_impl;
13 function extention_ok(){
14 return $this->sgbd_impl->extention_ok($this->env);
17 function connect($host, $base, $user, $password){
18 return $this->sgbd_impl->connect($host, $base, $user, $password);
21 function select_db($db_name){
22 return $this->sgbd_impl->select_db($db_name);
25 # ---------------------------------------------------------------------------------
29 function table_exists($table_name){
30 return $this->sgbd_impl->table_exists(
31 ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ?
32 str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $table_name)
37 function field_exists($table_name, $field_name){
38 return $this->sgbd_impl->field_exists(
40 $prefix_codes = array_keys($this->env->bdd("table_prefix"))) ?
41 str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $table_name)
49 return $this->sgbd_impl->query(
50 ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ?
51 str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $sql)
57 return $this->sgbd_impl->insert_id();
60 function fetch_assoc($rst){
61 return $this->sgbd_impl->fetch_assoc($rst);
64 function free_result($rst){
65 return $this->sgbd_impl->free_result($rst);
69 return $this->sgbd_impl->close();
72 # ---------------------------------------------------------------------------------
76 function data_exists($data_path){
77 return $this->sgbd_impl->data_exists($data_path);
80 function create_data($data_path){
81 return $this->sgbd_impl->create_data($data_path);
84 function get_data($data_path, $data_id){
85 return $this->sgbd_impl->get_data($data_path, $data_id);
88 function open_data($data_path, $FETCH = true){
89 return $this->sgbd_impl->open_data($data_path, $FETCH);
92 function fetch_data($dh){
93 return $this->sgbd_impl->fetch_data($dh);
96 function add_data($data_path, $data){
97 return $this->sgbd_impl->add_data($data_path, $data);
100 function last_index($dh){
101 return $this->sgbd_impl->last_index($dh);
104 function set_data($data_path, $data_id, $data){
105 return $this->sgbd_impl->set_data($data_path, $data_id, $data);
108 function del_data($data_path, $data_id){
109 return $this->sgbd_impl->del_data($data_path, $data_id);
112 function close_data($dh){
113 return $this->sgbd_impl->close_data($dh);
116 function remove_data($data_path){
117 return $this->sgbd_impl->remove_data($data_path);