diff --git a/fts.php b/fts.php index 6d08154..784fc57 100644 --- a/fts.php +++ b/fts.php @@ -103,6 +103,16 @@ class fts $dbl->whereAddParenthesisClose (); $i++; } + // Look for the order by date if provided + foreach ($dbl->fields () as $field=>$params) + { + if ($params[0] == "date" || $params[0] == "datetime" || + $params[0] == "time") + { + $dbl->orderAdd ($field, "DESC"); + break; + } + } return $dbl->execute (); }