Very quick question, I think the tiredness is getting to me;
How would I limit this query so it only gives me one result?
Code:
function next_prodn_header() {
$StartDate = get('start_date');
$timestamp = strtotime($StartDate);
$EndDate = get('end_date');
$Now = strtotime(date('d-m-Y'));
$Start = strtotime($EndDate);
$newStart = date_i18n('d-m-Y', $Start);
if ($Now <= $Start) {
for ($i = 1; $i < 1; $i++) {
echo "<h2>Next Event</h2>";
echo "<span class=\"month\">";
echo date_i18n('M', $timestamp);
echo "</span>\n";
echo "<span class=\"year\">";
echo date_i18n('Y', $timestamp);
echo "</span>\n\t\t";
echo "<p><a href='";
echo the_permalink();
echo "' title='";
echo the_title();
echo "'>";
echo the_title();
echo "</a></p>\n\t\t";
}
} else {
echo "";
}
}