PHP code example of williamheelis / sqldb

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

    

williamheelis / sqldb example snippets


[database]
host = localhost
username = myuser
password = mypass
database = mydb

use Restful\SQLdb;

$db = new SQLdb();
$db->put($email,$dob);
$User = $db->queryrow("SELECT * FROM users WHERE email=? AND date_of_birth=? ORDER BY email LIMIT 0,1");
echo $User['lastName'] . "<br />"'

use Restful\SQLdb;

$db = new SQLdb();
$db->put($last_name);
$db->query("SELECT * FROM users WHERE lastName=?");
while ($tmp = $db->getnextrow()){
    echo $tmp['email'] . "<br />";
}

use Restful\SQLdb;

$db = new SQLdb();
$db->put($id);
echo $db->quickquery("SELECT lastName FROM users WHERE id=?") . "<br />";