Fetching data from database based on current time PHP
<p>So I am fetching data from my PostgreSQL data by executing a query in my Index.php. This query fetches the name of the bus station name along with the corresponding time it will be arriving. What I want my application to do is fetch times for a specific bus station selected based on the current time.</p>

<p>My query is the following: </p>

<pre><code>   $query = " SELECT busname, bustime
              From busses
             where name = '$name' and time ='$time' LIMIT 5";
</code></pre>

<p>Would I need to do something in my query to achieve this or in my database ? </p>