<?php
include '_common.php';

$searchTerm = $_GET['q'];

// SQL 쿼리 생성
$result = sql_query("SELECT videocard_name FROM api___price_gpu WHERE videocard_name LIKE '%{$searchTerm}%' ");

$return_data = array();
while ($row = $result->fetch_assoc()) {
    $return_data[] = $row['videocard_name'];
}

echo json_encode($return_data);
?>
