[eluser]Uplift[/eluser]
Any idea why this query wont return any results.. probably something stupid but i can't see it.
Code:
function getUpcoming() {
$this->db->order_by("datet", "desc");
$this->db->select('title, datet');
$todaysDate = date('Y-m-d');
$queryUp = $this->db->get_where('events', array('datet' => '<= $todaysDate'));
return $queryUp->result_array();
}
this should select the
title and
datet from the
events table if
datet is less than or equal to
$todaysDate
basically, it should show all events that haven't happened yet. I also want to limit it to 10 results ordered by date (closest event first)
I have used $queryUp because i already have a query above using $query to return other results, do i need to do that?