<?php

include('../codebase/connector/combo_connector.php');
 
$res = mysql_connect('localhost','orkindb','rmschpsw1');
mysql_select_db('rmscheduler_orkincr_old');
if ( !$res)
    echo "NO ESTOY CONECTADO"; 

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

$combo = new ComboConnector($res);

$quer = "SELECT CONCAT( '|', t2.NameLast, ', ', t2.NameFirst ,  ' [' ,  SUBSTRING(t1.position,1,1), ']:', t2.id , '|') as value, ";
$quer = $quer . " t2.NameFirst";
$quer = $quer . " FROM organizationPersons t1, persons t2 WHERE t1.personId = t2.id ";
$quer = $quer . " AND t1.active = 1 AND organizationId = 'orkin_cr' ";
$combo->render_sql($quer,"NameFirst","NameFirst(value),NameFirst(label)");


?>
 