Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_connection(){
- $username= '';
- $password = '';
- ...
- return mysqli_connect();
- }
- function get_tests(){
- $CONNECT = get_connection();
- $res = mysqli_query($CONNECT, "SELECT * FROM `test`");
- if(!$res) return;
- $data = array();
- while($row = mysqli_fetch_assoc($res)){
- $data[] = $row;
- }
- return $data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement