Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class SQLi {
- private $isConnected; //our boolean to determine whether Blizzard is connected
- private $link; //our connection to the database
- private $stmt; //variable for storing statements
- public function __construct(){
- global $_CONF;
- global $core;
- $this->link = new mysqli ($_CONF['mysql']['host'],$_CONF['mysql']['user'],$_CONF['mysql']['password'],$_CONF['mysql']['db']); //open a connection to MySQL using the MySQLi wrapper
- $isConnected = true; //set the connected bool to true
- if($this->link->connect_error){ //if there is an error, excute this
- $isConnected=false; //change bool to false
- $core->Error("MySQL could not connect."); //output error
- }
- }
- public function Query($arg1,$arg2,$query){
- $stmt = $this->link->prepare($query.$arg1."=?".$arg2."=?"); //prepare the query - stop injections
- $stmt->bind_param();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment