comparison 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
comparison
equal deleted inserted replaced
105:29e7a40e6587 109:3450df471c8c
45 45
46 if( $this->weekofday != 7 ) { 46 if( $this->weekofday != 7 ) {
47 $options .= " AND WEEKDAY(starttime) = '".$this->weekofday."'"; 47 $options .= " AND WEEKDAY(starttime) = '".$this->weekofday."'";
48 } 48 }
49 49
50 if( $this->prgtime != 24 ) {
51 $options .= " AND time(starttime) BETWEEN cast('".sprintf( "%02d:00:00", $this->prgtime)."' as time) AND cast('".sprintf("%02d:59:59", $this->prgtime)."' as time)";
52 }
53
50 $options .= " ORDER BY starttime ASC"; 54 $options .= " ORDER BY starttime ASC";
51 55
52 $recs = array(); 56 $recs = array();
53 try { 57 try {
54 $recs = DBRecord::createRecords( PROGRAM_TBL, $options ); 58 $recs = DBRecord::createRecords( PROGRAM_TBL, $options );
55 } 59 }
56 catch( Exception $e ) { 60 catch( Exception $e ) {
57 throw $e; 61 throw $e;
58 } 62 }
59
60 return $recs; 63 return $recs;
61 } 64 }
62 65
63 66
64 public function reservation() { 67 public function reservation() {