[Webvcrplus-help] bug in lib/functions.php ?
Status: Beta
                
                Brought to you by:
                
                    chuckw
                    
                
            | 
     
      
      
      From: Xiaowen X. <x_...@ho...> - 2003-08-16 01:56:46
      
     
   | 
In the record function in lib/functions.php, the sql query used to select 
shows that conflict with the current one is :
		"SELECT * FROM program WHERE record='1' ".
		"AND ((start <= '".addslashes($start)."' AND ".
		"'".addslashes($start)."' < stop) OR ".
		"(start < '".addslashes($stop)."' AND ".
		"'".addslashes($stop)."' <= stop))"
but this misses the case where there already exists a show in the database 
that starts after the current one starts and ends before the current one 
ends.
So I think that line should be replaced with :
                "SELECT * FROM program WHERE record='1' ".
                "AND start < '".addslashes($stop)."' ".
                "AND stop > '".addslashes($start)."'"
_________________________________________________________________
Hotmail  -  Absolut kostenfrei! Der weltweit größte E-Mail-Anbieter im Netz: 
http://www.msn.de/hotmail
 |