Skip to content

berry.mysql

Nikos Siatras edited this page Sep 30, 2022 · 33 revisions

The berry.mysql package includes all necessary tools to read, write and update data to a MySQL Server.

Establish a connection with MySQL

The first thing you need to do to communicate with a MySQL server is to create a MySQLConnection.

require_once(__DIR__ . "/berry/mysql.php"); // Include php-berry mysql package

// Establish a connection with MySQL server
$connection = new MySQLConnection('localhost', "database_name", "username", "password", 'utf8');
$connection->Close()