Revision: 2610
          https://sourceforge.net/p/mrbs/code/2610/
Author:   cimorrison
Date:     2012-12-27 08:39:33 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Did the last change properly

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:36:36 UTC (rev 2609)
+++ mrbs/branches/linked_bookings/web/functions_table.inc       2012-12-27 
08:39:33 UTC (rev 2610)
@@ -747,7 +747,6 @@
   // 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.
-  // ORDER BY necessary so that multiple bookings appear in the right order
   $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,
@@ -758,9 +757,8 @@
              AND R.area_id = $area
              AND R.disabled = 0
              AND start_time <= $pm7 AND end_time > $am7
-        ORDER BY start_time
-           LIMIT $n_rooms";
-  
+        ORDER BY start_time";   // necessary so that multiple bookings appear 
in the right order
+
   $res = sql_query($sql);
   if (! $res)
   {
@@ -797,7 +795,8 @@
              AND R.area_id = A.id
              AND R.disabled = 0
              AND A.disabled = 0
-           ORDER BY sort_key";
+           ORDER BY sort_key
+           LIMIT $n_rooms";
 
   $res = sql_query($sql);
 
------------------------------------------------------------------------------
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