PHP code example of nickyeoman / php-mysql-helper

1. Go to this page and download the library: Download nickyeoman/php-mysql-helper 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/ */

    

nickyeoman / php-mysql-helper example snippets



USE Nickyeoman\Dbhelper;
$db = new Nickyeoman\Dbhelper\Dbhelp('127.0.0.1', 'username', 'thePassword', 'databaseName', '3306');
$db->close();

$array = array(
  'id'      => 'unique_key',
  'content' => 'data value'
)
$id = 'id'; // The key of the array to use as the lookup
$db->update("name_of_db_table, $array, $id);