PHP code example of rocketphp / mysqli
1. Go to this page and download the library: Download rocketphp/mysqli 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/ */
rocketphp / mysqli example snippets
use RocketPHP\MySQLi\MySQLi;
$mysqli = new MySQLi([
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'example_db',
'port' => null,
]);
$sql = "SELECT * FROM table_name
WHERE column_name = ?";
$values = array('column_value');
$fmt = array('%s');
$result = $mysqli->select($sql,
$values,
$fmt);