当前位置: 首页>>代码示例>>PHP>>正文


PHP Country::select方法代码示例

本文整理汇总了PHP中Country::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::select方法的具体用法?PHP Country::select怎么用?PHP Country::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Country的用法示例。


在下文中一共展示了Country::select方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     if (Input::get('q')) {
         $datums = Country::select('name AS value', 'id', 'abbreviation')->where('name', 'like', '%' . Input::get('q') . '%')->take(50)->get();
         foreach ($datums as $datum) {
             //print_r($datum->toArray());
             $datum->tokens = explode(' ', $datum->value);
         }
         return Response::json($datums);
     } else {
         return Response::json(Country::select('name AS value', 'id', 'abbreviation')->orderBy('name', 'ASC')->get());
     }
 }
开发者ID:strikles,项目名称:php,代码行数:13,代码来源:CountriesController.php

示例2: Country

<?php

include_once $CFG->dirroot . "/lib/classes/" . "application/Country.Class.php5";
$CountryObj = new Country();
$GeneralObj->getRequestVars();
$section = 'Country';
if ($mode == "Update") {
    $CountryObj->select($iCountryId);
    $CountryObj->getAllVar();
} else {
    $mode = "Add";
}
if ($file != '') {
    $link = "index.php?file=" . $file . "&mode=" . $mode . "&listfile=" . $listfile;
}
$TOP_HEADER = $mode . ' ' . $section;
if ($mode == 'Update') {
    $TOP_HEADER = $mode . ' ' . $section;
}
if ($mode == 'Update') {
    $TOP_HEADER .= ' [' . $vCountry . ']';
}
if ($eType != '') {
    $ExtraVal = "&eType=" . $eType;
}
?>
<form name="frmadd" method="post" action="index.php?file=t-country_masteradd_a" enctype="multipart/form-data" onSubmit="return validate_new(this);">
	<input type="hidden" name="mode" value="<?php 
echo $mode;
?>
">
开发者ID:redeyes1024,项目名称:medlii_mlm_backend,代码行数:31,代码来源:country_masteradd.inc.php

示例3: getCountries

 /**
  * Show a list of all the countries formatted for Datatables.
  *
  * @return Datatables JSON
  */
 public function getCountries()
 {
     $countries = Country::select(array('id', 'country', 'created_at', 'updated_at'));
     return Datatables::of($countries)->add_column('actions', '<a href="{{{ URL::to(\'admin/countries/\' . $id . \'/edit\' ) }}}" class="iframe btn btn-xs btn-default">{{{ Lang::get(\'button.edit\') }}}</a>
                             <a href="{{{ URL::to(\'admin/countries/\' . $id . \'/delete\' ) }}}" class="iframe btn btn-xs btn-danger">{{{ Lang::get(\'button.delete\') }}}</a>
         ')->remove_column('id')->make();
 }
开发者ID:EricBui0512,项目名称:FYP,代码行数:12,代码来源:RetailersController.php

示例4: PostVar

$iCountryId = PostVar("iCountryId");
$actionfile = GetVar("file");
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iCountryId={$iCountryId}";
$generalobj->checkDuplicate('iCountryId', PRJ_DB_PREFIX . "_country_master", array('vCountry' => $Data['vCountry']), $redirect_file, COUNTRY_ALREADY_EXISTS, $iCountryId);
if ($view == "add") {
    //prints($Data);exit;
    $countryObj->setAllVar($Data);
    $id = $countryObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
    } else {
        $var_msg = "Eror-in Add.";
    }
} else {
    if ($view == "edit") {
        $arr = $countryObj->select($iCountryId);
        $countryObj->setAllVar($arr);
        $countryObj->setAllVar($Data);
        $where = " iCountryId = '" . $iCountryId . "'";
        $id = $countryObj->update($where);
        if ($id) {
            $var_msg = "Record Updated Successfully.";
        } else {
            $var_msg = "Eror-in Update.";
        }
    }
}
header("Location:index.php?file=" . $actionfile . "&view=index&AX=Yes&var_msg={$var_msg}");
exit;
开发者ID:nstungxd,项目名称:F2CA5,代码行数:31,代码来源:addcountry_a.php


注:本文中的Country::select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。