PHP code example of znframework / package-database

1. Go to this page and download the library: Download znframework/package-database 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/ */

    

znframework / package-database example snippets


 N::run();

# The default settings are in the ZN\Database\DatabaseDefaultConfiguration file. 
# You can make your settings in this file.
# The Config::set() method should be used if you need to configure settings externally.
Config::database('database', 
[
    'driver'   => 'mysqli',
    'host'     => 'localhost', 
    'database' => 'test',
    'user'     => 'root',
    'password' => '',
    'prefix'   => ''
]);

$persons = DB::persons();

Output::display($persons->result());