PHP code example of ratingthomas / sqlmanager

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

    

ratingthomas / sqlmanager example snippets



  atingthomas\SQLManager\SQL;
  $sql = new SQL\SQL();

$sql->connect("db_name", "db_username", "db_password", "db_name");

$result = $sql->query("SELECT * FROM users WHERE userid = ? AND user_type = ?", ['1', 'superadmin'], true);
print_r($result);

$result = $sql->query("SELECT * FROM users", []);
print_r($result);

$sql->displayconnection()