feat: Refactor database connection handling to use centralized configuration
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
include_once __DIR__."/config.php";
|
||||
function getEstateData($city='宁波',$fDate,$toDate){
|
||||
$mysqli = new mysqli('localhost','root','nancysimon','myquant');
|
||||
$mysqli = get_mysqli_connection();
|
||||
$sql=<<<EOF
|
||||
SELECT city, listdate,sum(nums) as num FROM `estate_listing`
|
||||
where listdate>='$fDate' and listdate<='$toDate' and city='$city' group by listdate
|
||||
|
||||
Reference in New Issue
Block a user