CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Filter: between dates

Print topic Send  topic

Author Message
martin47

Posts: 35
Posted: 05/27/2009, 12:08 PM

Greetings. I created a grid and a filter box. The records have a date column and I added a date filter. The problem is that I need to change it so the filter allows to select 2 dates and the grid brings back the records between those dates. Is any tutorial about it or can someone guide me? Thanks ahead.
View profile  Send private message
aondecker

Posts: 58
Posted: 05/27/2009, 1:15 PM

Quote martin47:
Greetings. I created a grid and a filter box. The records have a date column and I added a date filter. The problem is that I need to change it so the filter allows to select 2 dates and the grid brings back the records between those dates. Is any tutorial about it or can someone guide me? Thanks ahead.


Easiest way is to add another filter box. then in your before select event on your grid. you can set the where clause to something like "where GridDate >= Filter1 and GridDate <= Filter2".
View profile  Send private message
martin47

Posts: 35
Posted: 05/27/2009, 3:49 PM

Thanks, that sounds like the easiest way. I was hoping to use the BETWEEN clause on the mysql statment but donīt understand well how to set it.
View profile  Send private message
aondecker

Posts: 58
Posted: 05/28/2009, 4:08 AM

Quote martin47:
Thanks, that sounds like the easiest way. I was hoping to use the BETWEEN clause on the mysql statment but donīt understand well how to set it.


The between is easy. It's like this.

select *
from table
where column_name
between Filter1 and Filter2
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright Đ 2003-2004 by UltraApps.com  and YesSoftware, Inc.