PHP code example of slam / mysql-php

1. Go to this page and download the library: Download slam/mysql-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

slam / mysql-php example snippets


$mysql = new \SlamMysql\Mysql('localhost', 'root', 'pwd', 'my_database', 3306, '/socket');
$return = $mysql->run(\STDIN, \STDOUT, \STDERR);
exit((int) (true !== $return));