<?php

require('../codebase/connector/combo_connector.php');
require("../codebase/connector/db_mysqli.php");
 
$res = db ();

if ( !$res)
    echo "NO ESTOY CONECTADO"; 

$res->query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");

$combo = new ComboConnector($res,"MySQLi");

$quer = "SELECT description, CONCAT( '|', description, '|') as value FROM organizationActivities  WHERE active = 1";
$combo->render_sql($quer,"description","description(value),description(label)");

function db () {
    static $conn;
    if ($conn===NULL){ 
        $conn = new mysqli('localhost','orkindb','rmschpsw1','rmscheduler_orkincr'); 
        $conn->set_charset("utf8");
    }
    return $conn;
}

?>
