Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Date filtering
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Date filtering
#55098
Date filtering 8 Years, 10 Months ago Karma: 0
I want to add seperate column filter to ARI Data Table with date range. Is it possible or not?
The administrator has disabled public write access.
 
#55099
Re:Date filtering 8 Years, 10 Months ago Karma: 747
Hello,

If you show data from a database, it is possible to use request variables in "WHERE" clause of an SQL query. For example it is possible to load "ARI Data Tables" module into an article and create a HTML search form outside the module. The form will contains controls to select start and/or end date. For example if controls from the form have name start_date and end_date and you want to filter by publish_date field in a table, query will look like:

Code:


SELECT
 id,
 title
FROM
 my_table
WHERE
 ({$REQUEST:start_date|empty:} <> '' AND publish date >= {$REQUEST:start_date|empty:})
 AND
 ({$REQUEST:end_date|empty:} <> '' AND publish date <= {$REQUEST:end_date|empty:})



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1