PHP code example of bearlikelion / medoo-provider

1. Go to this page and download the library: Download bearlikelion/medoo-provider 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/ */

    

bearlikelion / medoo-provider example snippets


return [
	/** The connection to use. */
	'connection' => 'medoo',

	/** The connections to choose from. */
	'connections' => [
		'medoo' => [
			/** Required */
			'server' => '{sever_host}',
			'username' => '{username}',
			'password' => '{password}',
			'database_type' => 'mysql',
			'database_name' => '{database_name}',

			/** Optional */
			'port' => 3306,
			'charset' => 'utf8',
		]
	]
];

	$container = $this->app->getContainer();
	$db = $container->resolve('Medoo'); // Medoo is also aliased as DB

	$student = $db->get('students', '*', [
		'name' => 'Bobby Tables'
	]);