$instanceNumber
$instanceNumber : integer
Class Mysqltcs Main class, this class create the mysql connection, and allow you to make query.
If you want to perform efficiently common tasks like a simple insert you can instance MysqlOperations passing the connection instantiated before
$mysqlRef : \it\thecsea\mysqltcs\connections\MysqlConnection
$mysqlConnections : \it\thecsea\mysqltcs\connections\MysqlConnections
$logger : \it\thecsea\mysqltcs\mysqltcsLogger|\it\thecsea\mysqltcs\SimpleLogger
__construct(String $host, String $user, String $password, String $name, boolean $newConnection = true, string $key = "", string $cert = "", string $ca = "")
Get a connection to mysql
String | $host | |
String | $user | |
String | $password | |
String | $name | database name |
boolean | $newConnection | optional, default true. If it is false the class uses an already open connection if it possible |
string | $key | optional |
string | $cert | optional |
string | $ca | optional |
setLogger(\it\thecsea\mysqltcs\mysqltcsLogger|\it\thecsea\mysqltcs\SimpleLogger $logger)
Set the logger, set null if you don't want to log
\it\thecsea\mysqltcs\mysqltcsLogger|\it\thecsea\mysqltcs\SimpleLogger | $logger |
getLogger() : \it\thecsea\mysqltcs\mysqltcsLogger|\it\thecsea\mysqltcs\SimpleLogger
Return the logger, it is not a clone so you can alter it
executeQuery(String $query) : boolean|\mysqli_result
Execute an sql query and log it
String | $query | sql query |
thrown if an sql error is occurred, the message contain the mysql error and query
mysql query return