Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

fatalnetwork/php-mysql-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP MySQL Connector (php-mysql-connector) v4.1.0

Connects one or more MySQL databases in your PHP application

Requirements

PHP 5 or higher, MySQL or MariaDB

How to use

include library

require_once './[PATH-TO-FILE]/MysqlConnector.php';

Replace [PATH-TO-FILE] with your path to this file

define configuration

$config = array(
  'host' => 'hostname or ip',
  'user' => 'database-user',
  'pass' => 'database-user-password',
  'database' => 'database-name',
);

instance application

$db = new MysqlConnector();

connect to your database

$db->connect($config['host'], $config['user'], $config['pass'], $config['database']);

make a query and get results directly

$query_results = $db->query('SELECT column_a, column_b AS column_d, column_c FROM table');

escape your string

$my_escaped_string = $db->get_escaped_string($string);

close the connection to your database

$db->close();

License

This bundle is under the MIT license.

About

Connects one or more MySQL databases in your PHP application

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages