23 lines
599 B
PHP
23 lines
599 B
PHP
<?php
|
|
function get_db_connection(){
|
|
$host = '127.0.0.1:3306';
|
|
$user_name = 'root';
|
|
$password = '1a9t7y';
|
|
$db_name = 'inventory';
|
|
|
|
$conn = mysqli_connect($host, $user_name, $password, $db_name) or die("Failed to
|
|
connect to MySQL: " . mysqli_error($conn));
|
|
|
|
return $conn;
|
|
}
|
|
|
|
function get_supported_data_types(){
|
|
return [
|
|
"date" => "Date",
|
|
"money" => "money",
|
|
"text" => "Long Description",
|
|
"varchar" => "Short Text",
|
|
"integer" => "Count"
|
|
];
|
|
}
|
|
?>
|