Skip to content
Snippets Groups Projects
Commit 7b8b189b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: select if field is null

parent c4782f96
No related branches found
No related tags found
No related merge requests found
......@@ -416,13 +416,13 @@ class Project extends CommonObject
{
if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date;
if (empty($datefieldname)) return 'Error this object has no date field defined';
$sql.=" AND ".$datefieldname." >= '".$this->db->idate($dates)."'";
$sql.=" AND (".$datefieldname." >= '".$this->db->idate($dates)."' OR ".$datefieldname." IS NULL)";
}
if ($datee > 0)
{
if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date;
if (empty($datefieldname)) return 'Error this object has no date field defined';
$sql.=" AND ".$datefieldname." <= '".$this->db->idate($datee)."'";
$sql.=" AND (".$datefieldname." <= '".$this->db->idate($datee)."' OR ".$datefieldname." IS NULL)";
}
if (! $sql) return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment