FYI: '$sClearText' \n";
$oFilter = DBObjectSearch::unserialize($sExpression);
$sExpression = $oFilter->ToOQL();
exit;
}
else
{
// leave $sExpression as is
}
$aExamples = array(
"Applications" => "SELECT bizApplication",
"Changes planned on new year's day" => "SELECT bizChangeTicket AS ch WHERE ch.start_date >= '2009-12-31' AND ch.end_date <= '2010-01-01'",
"Person having an 'A' in their name" => "SELECT bizPerson AS B WHERE B.name LIKE '%A%'",
"NW interfaces of equipment in production for customer 'Demo'" => "SELECT bizInterface AS if JOIN bizDevice AS dev ON if.device_id = dev.id WHERE if.status = 'production' AND dev.status = 'production' AND dev.org_name = 'Demo' AND if.physical_type = 'ethernet'"
);
$oP->add("
\n");
$oP->add("
Examples
\n");
$aDisplayData = array();
foreach($aExamples as $sDescription => $sOql)
{
$sHighlight = '';
$sDisable = '';
if ($sOql == $sExpression)
{
// this one is currently being tested, highlight it
$sHighlight = "background-color:yellow;";
$sDisable = 'disabled';
}
$aDisplayData[] = array(
'desc' => "