<?php

use Hura8\Database\ConnectDB;
use Hura8\Database\iConnectDB;

function create_bind_sql_parameter_from_value_list(array $value_list = [], $data_type = 'int') {
    $parameterized_ids = join(",", array_map(function (){ return '?'; }, $value_list));
    $bind_types = array_map(function () use ($data_type){ return ($data_type == 'int') ? 'd' : 's'; }, $value_list);

    return [$parameterized_ids, $bind_types];
}


function get_db($db_id ='', $debug=false) : iConnectDB {
    return ConnectDB::getInstance($db_id, $debug);
}
