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


PHP Database_Connection::createDatabase方法代码示例

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


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

示例1: queryAllStoreInfo

 public function queryAllStoreInfo()
 {
     include_once '../Database/Database_Connection.php';
     $databaseConnection = new Database_Connection();
     $databaseConnection->createDatabase();
     $databaseConnection->databaseConnect();
     $sql = "select * from scudsbook_store_info";
     $result = mysqli_query($databaseConnection->conn, $sql);
     $i = 1;
     if ($result->num_rows > 0) {
         // output data of each row
         while ($row = $result->fetch_assoc()) {
             $this->_store_name[$i] = $row['store_name'];
             $this->_store_rating[$i] = $row['store_rating'];
             $this->_store_category[$i] = $row['store_category'];
             $this->_store_location_lat[$i] = $row['store_location_lat'];
             $this->_store_location_lan[$i] = $row['store_location_lan'];
             $this->_default_address_street[$i] = $row['address_street'];
             $this->_default_address_street_ref[$i] = $row['address_ref'];
             $this->_default_address_city[$i] = $row['address_city'];
             $this->_default_address_state[$i] = $row['address_state'];
             $this->_default_address_zip[$i] = $row['address_zip'];
             $this->_default_address_country[$i] = $row['address_country'];
             $i++;
         }
     } else {
         echo "0 results";
     }
     mysqli_close($databaseConnection->conn);
     $databaseConnection->conn_state = false;
 }
开发者ID:scudsbook,项目名称:project_scudsbook,代码行数:31,代码来源:Store_Information.php

示例2: geocode

showStoreInfo();
?>

        <br><br>
        <div id="delete_store" align="center">
            <input type=text name=_delete_store id=_delete_store>
            <input type=submit name=delete id="delete_address" value=delete>
        </div>
    </form>
</div>

<?php 
if ($_POST) {
    include_once '../Database/Database_Connection.php';
    $databaseConnection = new Database_Connection();
    $databaseConnection->createDatabase();
    $_store_name = $_POST['_store_name'];
    if (!empty($_store_name)) {
        $_store_rating = $_POST['_store_rating'];
        $_store_category = $_POST['_store_category'];
        $_default_address_street = $_POST['_default_address_street'];
        $_default_address_city = $_POST['_default_address_city'];
        $_default_address_state = $_POST['_default_address_state'];
        $_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];
开发者ID:scudsbook,项目名称:project_scudsbook,代码行数:31,代码来源:Database_Store_Manager.php


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