I am doing a query but it returns repeated dates
<select name="option_date">
<?php
$sql_product_id = "SELECT * FROM `pat_order_product` WHERE `product_id` = $id_product";
$result_product_id = mysql_query($sql_product_id,$link);
while($row_product_id = mysql_fetch_array($result_product_id)){
$product_options = str_replace('\\','', $row_product_id["product_options"]);
$data = $product_options;
$books = json_decode($data, true);
$product_option_date = $books[0]['value']['name'];
?>
<option value="<?php echo $product_option_date; ?>"><?php echo $product_option_date; ?></option>
<?php } ?></select>
And when I execute the query, it results in these repeated dates
<select name="option_date">
<option value="26 Oct 2019">26 Oct 2019</option>
<option value="26 Oct 2019">26 Oct 2019</option>
<option value="26 Oct 2019">26 Oct 2019</option>
<option value="09 Nov 2019">09 Nov 2019</option>
<option value="09 Nov 2019">09 Nov 2019</option>
</select>
What I'm looking for is that I only get one result from each date
26 Oct 2019
09 Nov 2019