Changeset 153 for www/otevreno.php
- Timestamp:
- Feb 16, 2009, 6:16:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/otevreno.php
r148 r153 11 11 { 12 12 $Output = '<div align="center">'; 13 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ');14 while($Subject = $DbResult->fetch_a rray())13 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ORDER BY Name'); 14 while($Subject = $DbResult->fetch_assoc()) 15 15 { 16 16 $Output .= '<strong>'.$Subject['Name'].':</strong><br />'; … … 18 18 if($DbResult2->num_rows > 0) 19 19 { 20 $DbRow = $DbResult2->fetch_a rray();20 $DbRow = $DbResult2->fetch_assoc(); 21 21 $Output .= 'Zavírá za '.$DbRow['RemainTime']; 22 22 } else 23 23 { 24 24 $DbResult2 = $this->Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(OpenTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") < OpenTime AND Subject='.$Subject['Subject'].' ORDER BY OpenTime LIMIT 1'); 25 $DbRow = $DbResult2->fetch_a rray();25 $DbRow = $DbResult2->fetch_assoc(); 26 26 $Output .= 'Otevírá za '.$DbRow['RemainTime']; 27 27 } … … 34 34 if($DbResult2->num_rows) 35 35 { 36 while($TimeInterval = $DbResult2->fetch_a rray())36 while($TimeInterval = $DbResult2->fetch_assoc()) 37 37 { 38 38 $Output .= $TimeInterval['OpenTime'].' - '.$TimeInterval['CloseTime'].' ';
Note:
See TracChangeset
for help on using the changeset viewer.