<?php
header('Content-type: application/json');
include '../config/database.php';
function _get_comment_stock(){
	$conn = _connectDB();
	$sql = "SHOW Full COLUMNS FROM stock_list;";
	$result = $conn->query($sql);
	$res = [];
	if ($result->num_rows > 0) {
	    while($row = $result->fetch_assoc()) {
			array_push($res,$row);
	    }
	}
	return $res;
}
echo json_encode(_get_comment_stock());

