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


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 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.


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 9 Years, 4 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 9 Years, 4 Months ago Karma: 760
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