Commit 87d41df0 authored by Bate's avatar Bate

Planning2

parent 7f31d1a5
......@@ -422,10 +422,10 @@ class planning2 extends stdentity
else
return new requete($this->db,
"SELECT start as date FROM pl2_gap
WHERE id_planning = $this->id
AND end > '".gmdate("Y-m-d H:i:s",$start)."'
AND start < '".gmdate("Y-m-d H:i:s",$end)."'
UNION DISTINCT
WHERE id_planning = $this->id ".
(is_null($start)?"":("AND end > '".gmdate("Y-m-d H:i:s",$start)."' ")).
(is_null($end)?"":("AND start < '".gmdate("Y-m-d H:i:s",$end)."' ")).
"UNION DISTINCT
SELECT end as date FROM pl2_gap
WHERE id_planning = $this->id ".
(is_null($start)?"":("AND end > '".gmdate("Y-m-d H:i:s",$start)."' ")).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment