I need help to display a record of the database, following code:
<?php
$posts = DBRead( 'posts', "WHERE categoria = 3 AND status = 1 ORDER BY data_numero ASC" );
if( !$posts )
echo '<h2>Nenhuma Corrida Registrada!</h2>';
else
foreach ( $posts as $post ):
?>
I would need to make the foreach return the with the smallest date and only one to insert into a BOX.