feat: Refactor database connection handling to use centralized configuration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require_once "vendor/autoload.php";
|
||||
include_once __DIR__."/config.php";
|
||||
use PhpOffice\PhpSpreadsheet\Reader\Csv;
|
||||
|
||||
/**
|
||||
@@ -26,7 +27,7 @@ function readMyExcel($file): array
|
||||
*/
|
||||
function dbOp($data,$company)
|
||||
{
|
||||
$mysqli = new mysqli('localhost', 'root', 'nancysimon', 'myquant');
|
||||
$mysqli = get_mysqli_connection();
|
||||
$maxrow = count($data);
|
||||
$maxcol = count($data[0]);
|
||||
$msg = array();
|
||||
|
||||
Reference in New Issue
Block a user