本文整理汇总了PHP中Service::AddDataSourceField方法的典型用法代码示例。如果您正苦于以下问题:PHP Service::AddDataSourceField方法的具体用法?PHP Service::AddDataSourceField怎么用?PHP Service::AddDataSourceField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service
的用法示例。
在下文中一共展示了Service::AddDataSourceField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Page_BeforeInitialize
function Page_BeforeInitialize(&$sender)
{
$Page_BeforeInitialize = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $index;
//Compatibility
//End Page_BeforeInitialize
//YahooAutocomplete1 Initialization @169-663F79D3
if ('sex_occupation_patient1s_keywordYahooAutocomplete1' == CCGetParam('callbackControl')) {
$Service = new Service();
$Service->SetFormatter(new JsonFormatter());
//End YahooAutocomplete1 Initialization
//YahooAutocomplete1 DataSource @169-D7716879
$Service->DataSource = new clsDBConnection1();
$Service->ds =& $Service->DataSource;
$Service->DataSource->SQL = "SELECT * \n" . "FROM patient {SQL_Where} {SQL_OrderBy}";
$Service->DataSource->Parameters["urlquery"] = CCGetFromGet("query", NULL);
$Service->DataSource->wp = new clsSQLParameters();
$Service->DataSource->wp->AddParameter("1", "urlquery", ccsText, "", "", $Service->DataSource->Parameters["urlquery"], -1, false);
$Service->DataSource->wp->Criterion[1] = $Service->DataSource->wp->Operation(opBeginsWith, "surname", $Service->DataSource->wp->GetDBValue("1"), $Service->DataSource->ToSQL($Service->DataSource->wp->GetDBValue("1"), ccsText), false);
$Service->DataSource->Where = $Service->DataSource->wp->Criterion[1];
$Service->SetDataSourceQuery(CCBuildSQL($Service->DataSource->SQL, $Service->DataSource->Where, $Service->DataSource->Order));
//End YahooAutocomplete1 DataSource
//YahooAutocomplete1 DataFields @169-7B8C1313
$Service->AddDataSourceField('surname');
//End YahooAutocomplete1 DataFields
//YahooAutocomplete1 Execution @169-73F24F96
echo '{"Result":' . $Service->Execute() . '}';
//End YahooAutocomplete1 Execution
//YahooAutocomplete1 Tail @169-27890EF8
exit;
}
//End YahooAutocomplete1 Tail
//YahooAutocomplete2 Initialization @170-F89F3274
if ('sex_occupation_patient1s_keywordYahooAutocomplete2' == CCGetParam('callbackControl')) {
$Service = new Service();
$Service->SetFormatter(new JsonFormatter());
//End YahooAutocomplete2 Initialization
//YahooAutocomplete2 DataSource @170-A29C63C1
$Service->DataSource = new clsDBConnection1();
$Service->ds =& $Service->DataSource;
$Service->DataSource->SQL = "SELECT * \n" . "FROM patient {SQL_Where} {SQL_OrderBy}";
$Service->DataSource->Parameters["urlquery"] = CCGetFromGet("query", NULL);
$Service->DataSource->wp = new clsSQLParameters();
$Service->DataSource->wp->AddParameter("1", "urlquery", ccsText, "", "", $Service->DataSource->Parameters["urlquery"], -1, false);
$Service->DataSource->wp->Criterion[1] = $Service->DataSource->wp->Operation(opBeginsWith, "other_names", $Service->DataSource->wp->GetDBValue("1"), $Service->DataSource->ToSQL($Service->DataSource->wp->GetDBValue("1"), ccsText), false);
$Service->DataSource->Where = $Service->DataSource->wp->Criterion[1];
$Service->SetDataSourceQuery(CCBuildSQL($Service->DataSource->SQL, $Service->DataSource->Where, $Service->DataSource->Order));
//End YahooAutocomplete2 DataSource
//YahooAutocomplete2 DataFields @170-6D762D08
$Service->AddDataSourceField('other_names');
//End YahooAutocomplete2 DataFields
//YahooAutocomplete2 Execution @170-73F24F96
echo '{"Result":' . $Service->Execute() . '}';
//End YahooAutocomplete2 Execution
//YahooAutocomplete2 Tail @170-27890EF8
exit;
}
//End YahooAutocomplete2 Tail
//YahooAutocomplete3 Initialization @171-8D00F4E9
if ('sex_occupation_patient1s_keywordYahooAutocomplete3' == CCGetParam('callbackControl')) {
$Service = new Service();
$Service->SetFormatter(new JsonFormatter());
//End YahooAutocomplete3 Initialization
//YahooAutocomplete3 DataSource @171-6F74E980
$Service->DataSource = new clsDBConnection1();
$Service->ds =& $Service->DataSource;
$Service->DataSource->SQL = "SELECT * \n" . "FROM patient {SQL_Where} {SQL_OrderBy}";
$Service->DataSource->Parameters["urlquery"] = CCGetFromGet("query", NULL);
$Service->DataSource->wp = new clsSQLParameters();
$Service->DataSource->wp->AddParameter("1", "urlquery", ccsText, "", "", $Service->DataSource->Parameters["urlquery"], -1, false);
$Service->DataSource->wp->Criterion[1] = $Service->DataSource->wp->Operation(opBeginsWith, "hospital_no", $Service->DataSource->wp->GetDBValue("1"), $Service->DataSource->ToSQL($Service->DataSource->wp->GetDBValue("1"), ccsText), false);
$Service->DataSource->Where = $Service->DataSource->wp->Criterion[1];
$Service->SetDataSourceQuery(CCBuildSQL($Service->DataSource->SQL, $Service->DataSource->Where, $Service->DataSource->Order));
//End YahooAutocomplete3 DataSource
//YahooAutocomplete3 DataFields @171-BAEED557
$Service->AddDataSourceField('hospital_no');
//End YahooAutocomplete3 DataFields
//YahooAutocomplete3 Execution @171-73F24F96
echo '{"Result":' . $Service->Execute() . '}';
//End YahooAutocomplete3 Execution
//YahooAutocomplete3 Tail @171-27890EF8
exit;
}
//End YahooAutocomplete3 Tail
//YahooAutocomplete1 Initialization @172-3ED9C29E
if ('title_status_users_result1s_patient_idYahooAutocomplete1' == CCGetParam('callbackControl')) {
$Service = new Service();
$Service->SetFormatter(new JsonFormatter());
//End YahooAutocomplete1 Initialization
//YahooAutocomplete1 DataSource @172-EB18E68D
$Service->DataSource = new clsDBConnection1();
$Service->ds =& $Service->DataSource;
$Service->DataSource->SQL = "SELECT * \n" . "FROM patient {SQL_Where} {SQL_OrderBy}";
$Service->DataSource->Parameters["urlquery"] = CCGetFromGet("query", NULL);
$Service->DataSource->wp = new clsSQLParameters();
$Service->DataSource->wp->AddParameter("1", "urlquery", ccsText, "", "", $Service->DataSource->Parameters["urlquery"], -1, false);
$Service->DataSource->wp->Criterion[1] = $Service->DataSource->wp->Operation(opBeginsWith, "patient_id", $Service->DataSource->wp->GetDBValue("1"), $Service->DataSource->ToSQL($Service->DataSource->wp->GetDBValue("1"), ccsText), false);
$Service->DataSource->Where = $Service->DataSource->wp->Criterion[1];
//.........这里部分代码省略.........