You can try this one :)
//creates database connection
$connection=mysql_connect("localhost","root","");
//selects database connection
$database_select=mysql_select_db("your_database_name",$connection);
//put the entered date to loc_date variable
$loc_date='2017-12-06';
//select * date with 2017-12-06 on table_query but would display only 1 since theres a LIMIT
$query1=mysql_query("select * from table_query WHERE date='$loc_date' LIMIT 1");
while($loc_query=mysql_fetch_array($query1)){
echo $loc_query['date']; //prints the date - 2017-12-06 if present
}
I think you want to display the date which is '2017-12-06' on your table_query. But since you want to limit the record to be displayed to 1, so only one(1) date which is 2017-12-06 would be displayed on that code. If theres more than 1 record(date:2017-12-06) saved on that table, you can remove the "LIMIT 1" on mysql query so that it will display all.
$loc_query="SELECT * FROM TABLE WHERE date = $loc_date";