Спойлер (Отобразить)
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- class DB {
- protected $instance;
- private $query,
- $loadFromCache = false,
- $currentRow = 0;
- public function __construct(){
- $this->instance = db_singletone::getInstance();
- }
- public function __invoke($query, $cacheThis = true, $expired = 10){
- return false;
- }
- }
- $this->loadFromCache = true;
- return $this;
- }
- $data['num_rows'] = $count;
- for($k=0;$k<$count;$k++){
- }
- $this->query = $SQL;
- return $this;
- }
- // &&&&&& MySQLi Functions &&&&&& //
- public function fetch_fields(){
- }
- public function fetch_field(){
- }
- public function num_fields(){
- }
- public function num_rows(){
- if($this->loadFromCache == false)
- else
- return $this->query['num_rows'];
- }
- public function fetch_row(){
- }
- public function fetch_array(){
- }
- public function fetch_assoc(){
- if($this->loadFromCache == false)
- else {
- $row = $this->currentRow;
- $data = $this->query['data'][$row];
- $row++; $this->currentRow = $row;
- return $data;
- }
- }
- public function free(){
- }
- }