Menu

#25 bug in lib/functions.php ?

open
nobody
5
2003-08-29
2003-08-29
No

Date: Sat, 16 Aug 2003 01:48:39 +0000
From: Xiaowen Xin <x_x150@hotmail.com>
To: webvcrplus-help@lists.sourceforge.net
Subject: [Webvcrplus-help] bug in lib/functions.php ?

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)."'"

Discussion


Log in to post a comment.