src/Bi/Db.php
private function SetObjData($_table, $_fields, $_data)
    {
        $this->table = $_table;
        $this->fields = $_fields;
        $this->data[] = array();

        if (isset($_data[0]) and is_array($_data[0])) {
            for ($i=0; $i<count($_data); $i++) {
                foreach ($this->fields as $field) {
                    if (isset($_data[$i][$field]) and !$this->IsFieldLocked($field)) {
                        $this->data[$i][$field] = $this->Escape($_data[$i][$field]);
                    }
                }
            }
        } else {
            foreach ($this->fields as $field) {
                if (isset($_data[$field]) and !$this->IsFieldLocked($field)) {
                    $this->data[0][$field] = $this->Escape($_data[$field]);
                }
            }
        }
    }
private function SetObjData($_table, $_fields, $_data)
    {
        $this->table = $_table;
        $this->fields = $_fields;
        $this->data[] = array();

        if (isset($_data[0]) and is_array($_data[0])) {
            for ($i=0; $i<count($_data); $i++) {
                foreach ($this->fields as $field) {
                    if (isset($_data[$i][$field]) and !$this->IsFieldLocked($field)) {
                        $this->data[$i][$field] = $this->Escape($_data[$i][$field]);
                    }
                }
            }
        } else {
            foreach ($this->fields as $field) {
                if (isset($_data[$field]) and !$this->IsFieldLocked($field)) {
                    $this->data[0][$field] = $this->Escape($_data[$field]);
                }
            }
        }
    }
private function SetObjData ( $ _table , $ _fields , $ _data ) { $ this -> table = $ _table ; $ this -> fields = $ _fields ; $ this -> data [ ] = array ( ) ; if ( isset ( $ _data [ 0 ] ) and is_array ( $ _data [ 0 ] ) ) { for ( $ i = 0 ; $ i < count ( $ _data ) ; $ i ++ ) { foreach ( $ this -> fields as $ field ) { if ( isset ( $ _data [ $ i ] [ $ field ] ) and ! $ this -> IsFieldLocked ( $ field ) ) { $ this -> data [ $ i ] [ $ field ] = $ this -> Escape ( $ _data [ $ i ] [ $ field ] ) ; } } } } else { foreach ( $ this -> fields as $ field ) { if ( isset ( $ _data [ $ field ] ) and ! $ this -> IsFieldLocked ( $ field ) ) { $ this -> data [ 0 ] [ $ field ] = $ this -> Escape ( $ _data [ $ field ] ) ; } } } }
sets data to be inserted or updated - cleans unwanted chars

@param array $_table
@param array $_fields
@param array $_data
sets data to be inserted or updated - cleans unwanted chars