本文整理汇总了PHP中global_common::convertToDecimal方法的典型用法代码示例。如果您正苦于以下问题:PHP global_common::convertToDecimal方法的具体用法?PHP global_common::convertToDecimal怎么用?PHP global_common::convertToDecimal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global_common
的用法示例。
在下文中一共展示了global_common::convertToDecimal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getStoreByIDs
public function getStoreByIDs($arrIDs)
{
$arrIDs = global_common::splitString($arrIDs);
$strQueryIN = global_common::convertToQueryIN($arrIDs);
if ($strQueryIN) {
$strQueryIN = global_mapping::StoreID . ' IN (' . $strQueryIN . ')';
} else {
$strQueryIN = '1=1';
}
$whereClause = 'WHERE ' . $strQueryIN;
$strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_STORE, $whereClause . ' ' . ' limit 0,' . self::NUM_PER_PAGE));
//echo $strSQL;
$arrResult = $this->_objConnection->selectCommand($strSQL);
if (!$arrResult) {
global_common::writeLog('get getProductByIDs:' . $strSQL, 1, $_mainFrame->pPage);
return null;
}
$objCity = new Model_City($this->_objConnection);
$objDistrict = new Model_District($this->_objConnection);
$tempVarCities = $objCity->getAllCity();
$allCities = null;
foreach ($tempVarCities as $key => $info) {
$allCities[$info[global_mapping::CityID]] = $info;
unset($tempVarCities[$key]);
}
$tempDistricts = $objDistrict->getAllDistrict();
$allDistricts = null;
foreach ($tempDistricts as $key => $info) {
$allDistricts[$info[global_mapping::DistrictID]] = $info;
unset($tempDistricts[$key]);
}
// print_r($allDistricts);
// return;
$count = count($arrResult);
$objArticle = new Model_Article($this->_objConnection);
for ($i = 0; $i < $count; $i++) {
//echo $arrResult;
//print_r( $allCities);
//$arrResult[$i][global_mapping::CityID] = $allCities[$arrResult[$i][global_mapping::CityID]];
$arrResult[$i][global_mapping::CityName] = $allCities[$arrResult[$i][global_mapping::CityID]][global_mapping::CityName];
// print_r($arrResult[$i]);
//return;
// print_r($allCities[$arrResult[$i][global_mapping::CityID]]);
//break;
$arrResult[$i][global_mapping::DistrictName] = $allDistricts[$arrResult[$i][global_mapping::DistrictID]][global_mapping::DistrictName];
$arrResult[$i][global_mapping::Latitude] = global_common::convertToDecimal($arrResult[$i][global_mapping::Latitude]);
$arrResult[$i][global_mapping::Longitude] = global_common::convertToDecimal($arrResult[$i][global_mapping::Longitude]);
$arrArticle = $objArticle->getArticleByStoreID($arrResult[$i][global_mapping::StoreID]);
$shortDescription = global_common::formatPlanText($arrArticle[0][global_mapping::Content]);
$arrResult[$i][global_mapping::Content] = global_common::cutString2($shortDescription, 0, 16);
// print_r($arrResult[$i]);
//echo $arrResult[$i][global_mapping::DistrictID];
//echo $allDistricts[$arrResult[$i][global_mapping::DistrictID]][global_mapping::DistrictName];
//print_r($allDistricts);
//return ;
}
//print_r($stores);
return $arrResult;
}
示例2: array
if(!$distance || $distance<=0 || $distance>$_distance )
{
$distance = $_distance;
}
//echo $address;
$location = global_common::getLocation($_gmapAPI,$address);
}
else
{
//echo 'lat & long';
$location = array('lat' =>global_common::convertToDecimal( $_pgR["lat"]),
'long' => global_common::convertToDecimal($_pgR["lng"]));
}
*/
$location = array('lat' => global_common::convertToDecimal($_pgR["lat"]), 'long' => global_common::convertToDecimal($_pgR["lng"]));
//echo $address;
//echo $address;
$condition = '';
if ($cat && $cat != 'undefined') {
$childCats = $objArticleType->getAllArticleType(0, '*', global_mapping::ParentID . '=' . $cat);
if (count($childCats) > 0) {
$arrCatID = global_common::getArrayColumn($childCats, global_mapping::ArticleTypeID);
$condition = '`' . global_mapping::MainCategoryId . '` IN (' . global_common::convertToQueryIN($arrCatID) . ')';
} else {
$condition = '`' . global_mapping::MainCategoryId . '` =' . $cat;
}
} else {
$cat = '0';
}
if ($address) {