Revision: 2622
          https://sourceforge.net/p/mrbs/code/2622/
Author:   cimorrison
Date:     2012-12-29 20:24:31 +0000 (Sat, 29 Dec 2012)
Log Message:
-----------
Made report.php work with new tables

Modified Paths:
--------------
    mrbs/branches/linked_bookings/web/report.php

Modified: mrbs/branches/linked_bookings/web/report.php
===================================================================
--- mrbs/branches/linked_bookings/web/report.php        2012-12-29 20:19:22 UTC 
(rev 2621)
+++ mrbs/branches/linked_bookings/web/report.php        2012-12-29 20:24:31 UTC 
(rev 2622)
@@ -1203,14 +1203,16 @@
     // information in order to construct the recurrence rule
     $sql .= ", T.rep_type, T.end_date, T.rep_opt, T.rep_num_weeks";
   }
-  $sql .= " FROM $tbl_area A, $tbl_room R, $tbl_entry E";
+  $sql .= " FROM $tbl_area A, $tbl_room R, $tbl_room_entry RE, $tbl_entry E";
   if ($output_format == OUTPUT_ICAL)
   {
     // We do a LEFT JOIN because we still want the single entries, ie the ones
     // that won't have a match in the repeat table
     $sql .= " LEFT JOIN $tbl_repeat T ON E.repeat_id=T.id";
   }
-  $sql .= " WHERE E.room_id=R.id AND R.area_id=A.id"
+  $sql .= " WHERE E.id=RE.entry_id"
+        . " AND RE.room_id=R.id"
+        . " AND R.area_id=A.id"
         . " AND E.start_time < $report_end AND E.end_time > $report_start";
   if ($output_format == OUTPUT_ICAL)
   {
------------------------------------------------------------------------------
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. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to