本文整理汇总了PHP中Database_Connection::databaseConnect方法的典型用法代码示例。如果您正苦于以下问题:PHP Database_Connection::databaseConnect方法的具体用法?PHP Database_Connection::databaseConnect怎么用?PHP Database_Connection::databaseConnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Database_Connection
的用法示例。
在下文中一共展示了Database_Connection::databaseConnect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}