Skip to content

7elven/PHP-MySQLi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

PHP-MySQLi

simple php class connect to mysql database

How to use

git clone https://github.com/7elven/PHP-MySQLi.git

Easy Example

require_once '/{path-to}/PHPMySQLi.php';

$db = new PHPMySQLi('localhost','username','password','database');

$sql = "SELECT * FROM users WHERE user = ?";
$params = ["john"]; //$params is array
$result = $db->query($sql,$params);
$fetch = $db->fetch_all($result);

print_r($fetch);

INSERT

$sql = "INSERT INTO users (user,email) VALUES (?,?)";
$params = ["jay","[email protected]"]; //$params is array
$db->query($sql,$params);

Releases

No releases published

Packages

No packages published

Languages