Revision: 1765
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1765&view=rev
Author:   cimorrison
Date:     2011-01-28 09:42:18 +0000 (Fri, 28 Jan 2011)

Log Message:
-----------
Fixed search so that it can handle mixed periods and times

Modified Paths:
--------------
    mrbs/trunk/web/search.php

Modified: mrbs/trunk/web/search.php
===================================================================
--- mrbs/trunk/web/search.php   2011-01-28 09:40:18 UTC (rev 1764)
+++ mrbs/trunk/web/search.php   2011-01-28 09:42:18 UTC (rev 1765)
@@ -154,10 +154,11 @@
 }
 
 // Now we set up the "real" query using LIMIT to just get the stuff we want.
-$sql = "SELECT E.id AS entry_id, E.create_by, E.name, E.description, 
E.start_time, R.area_id
-        FROM $tbl_entry E, $tbl_room R, $tbl_area A
-        WHERE $sql_pred
-        ORDER BY E.start_time asc "
+$sql = "SELECT E.id AS entry_id, E.create_by, E.name, E.description, 
E.start_time,
+               R.area_id, A.enable_periods
+          FROM $tbl_entry E, $tbl_room R, $tbl_area A
+         WHERE $sql_pred
+      ORDER BY E.start_time asc "
   . sql_syntax_limit($search["count"], $search_pos);
 
 // this is a flag to tell us not to display a "Next" link
@@ -236,7 +237,7 @@
   // generate a link to the day.php
   $link = getdate($row['start_time']);
   echo "<td><a 
href=\"day.php?day=$link[mday]&amp;month=$link[mon]&amp;year=$link[year]&amp;area=".$row['area_id']."\">";
-  if(empty($enable_periods))
+  if(empty($row['enable_periods']))
   {
     $link_str = time_date_string($row['start_time']);
   }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to