Revision: 2608
          https://sourceforge.net/p/mrbs/code/2608/
Author:   cimorrison
Date:     2012-12-27 08:32:57 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Made Day view work with new tables

Modified Paths:
--------------
    mrbs/branches/linked_bookings/web/functions_table.inc

Modified: mrbs/branches/linked_bookings/web/functions_table.inc
===================================================================
--- mrbs/branches/linked_bookings/web/functions_table.inc       2012-12-27 
08:23:53 UTC (rev 2607)
+++ mrbs/branches/linked_bookings/web/functions_table.inc       2012-12-27 
08:32:57 UTC (rev 2608)
@@ -683,7 +683,7 @@
 
 function day_table_innerhtml($day, $month, $year, $room, $area, 
$timetohighlight=NULL)
 {
-  global $tbl_entry, $tbl_room, $tbl_area;
+  global $tbl_entry, $tbl_room, $tbl_area, $tbl_room_entry;
   global $enable_periods, $periods;
   global $times_along_top, $row_labels_both_sides, $column_labels_both_ends;
   global $resolution, $morningstarts, $morningstarts_minutes, $eveningends, 
$eveningends_minutes;
@@ -747,12 +747,13 @@
   // Note: The predicate clause 'start_time <= ...' is an equivalent but 
simpler
   // form of the original which had 3 BETWEEN parts. It selects all entries 
which
   // occur on or cross the current day.
-  $sql = "SELECT R.id AS room_id, start_time, end_time, name, repeat_id,
+  $sql = "SELECT RE.room_id AS room_id, start_time, end_time, name, repeat_id,
                  E.id AS entry_id, type,
                  E.description AS entry_description, status,
                  E.create_by AS entry_create_by
-            FROM $tbl_entry E, $tbl_room R
-           WHERE E.room_id = R.id
+            FROM $tbl_entry E, $tbl_room R, $tbl_room_entry RE
+           WHERE E.id = RE.entry_id
+             AND RE.room_id = R.id
              AND R.area_id = $area
              AND R.disabled = 0
              AND start_time <= $pm7 AND end_time > $am7
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to