本文整理汇总了PHP中Database_Connection::deletStoreInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Database_Connection::deletStoreInfo方法的具体用法?PHP Database_Connection::deletStoreInfo怎么用?PHP Database_Connection::deletStoreInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Database_Connection
的用法示例。
在下文中一共展示了Database_Connection::deletStoreInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: geocode
$_default_address_zip = $_POST['_default_address_zip'];
$_default_address_country = $_POST['_default_address_country'];
// get latitude, longitude and formatted address
$data_arr = geocode($_default_address_street . ',' . $_default_address_city . ',' . $_default_address_state . ',' . $_default_address_zip . ',' . $_default_address_country);
// if able to geocode the address
if ($data_arr) {
$latitude = $data_arr[0];
$longitude = $data_arr[1];
$databaseConnection->addStoreInfo($_store_name, $_store_rating, $_store_category, $latitude, $longitude, $_default_address_street, '', $_default_address_city, $_default_address_state, $_default_address_zip, $_default_address_country);
echo "<script>window.location.reload()</script>";
} else {
echo "The address does not exist, please try again!";
}
} else {
$delete_store_name = $_POST['_delete_store'];
$databaseConnection->deletStoreInfo($delete_store_name);
}
}
?>
<?php
// function to geocode address, it will return false if unable to geocode address
function geocode($address)
{
// url encode the address
$address = urlencode($address);
// google map geocode api url
$url = "https://maps.googleapis.com/maps/api/geocode/json?key=AIzaSyDZwgb_z_wFGqrzvxbrLri_CXJRjklDoTM&address={$address}";
// get the json response
$resp_json = file_get_contents($url);
// decode the json