-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDB.php
More file actions
33 lines (25 loc) · 790 Bytes
/
DB.php
File metadata and controls
33 lines (25 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
interface DB{
//Trasaction connection
public function connect($hostname, $database, $username, $password, $port);
public function begin_trans();
//Query builder for SQL trasaction
public function select($table, $column, $where, $order);
public function update($table, $data, $where);
public function insert($table, $data);
public function delete($table, $where);
//Custom query and with binding variables
public function query($sql);
public function bindParam($value);
//Executing query
public function execute();
//Fetching data
public function fetch_row();
public function fetch_assoc();
public function fetch_object();
//Trasaction status
public function rollback();
public function commit();
//Trasaction connection
public function close();
}