PHP code example of spfalz / db_mysqli

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

    

spfalz / db_mysqli example snippets


// ...Your path/to/mysqlidb_class.php");

// ..Rest of your code here



$db = new spfalz\db_mysqli;
$db->Connect();
$mver = $db->Version();
$db->Disconnect();
echo("Your MySQL Server is V".$mver);



$db = new spfalz\db_mysqli('/path/to/my/own/config.inc.php');
$db->Connect();
$mver = $db->Version();
$db->Disconnect();
echo("Your MySQL Server is V".$mver);

$db = new spfalz\db_mysqli;

$db = new spfalz\db_mysqli("/path/to/your/own/dbdefs.inc.php");

$stmt = $db->QueryResult("SELECT FOO FROM BAR ORDER BY FOO");
while($data = $db->FetchResult($stmt))
  {
  echo($data['FOO']);
  }
$db->FreeResult($stmt);

$data[0]['fieldname1'] = 'value0/1';
$data[0]['fieldname2'] = 'value0/2';
$data[1]['fieldname1'] = 'value1/2';
$data[1]['fieldname2'] = 'value1/2';

$db->SetDebug(db_mysqli::DBOF_DEBUGSCREEN);
$db->Query('SELECT FOO FROM BAR WHERE DUMMY=1');

$db = new db_MySQL;

$db = new spfalz\db_mysqli;