diff Keyword.class.php @ 109:3450df471c8c

merged with upstream
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 09 Mar 2010 05:56:04 +0900
parents 57676bb30f64
children 7a64d5e3baee
line wrap: on
line diff
--- a/Keyword.class.php	Tue Mar 09 05:42:26 2010 +0900
+++ b/Keyword.class.php	Tue Mar 09 05:56:04 2010 +0900
@@ -47,6 +47,10 @@
 			$options .= " AND WEEKDAY(starttime) = '".$this->weekofday."'";
 		}
 		
+		if( $this->prgtime != 24 ) {
+			$options .= " AND time(starttime) BETWEEN cast('".sprintf( "%02d:00:00", $this->prgtime)."' as time) AND cast('".sprintf("%02d:59:59", $this->prgtime)."' as time)";
+		}
+		
 		$options .= " ORDER BY starttime ASC";
 		
 		$recs = array();
@@ -56,7 +60,6 @@
 		catch( Exception $e ) {
 			throw $e;
 		}
-		
 		return $recs;
 	}