WizyWyg
|
Posted: 02/03/2003, 11:37 PM |
|
In CC, I want to be able to display only records that have been added to a
DB in the last 30 days. In the table i have a field called "dateadded" and
it uses the Date Format found in MySql (0000-00-00). How do I go about
constructing a query to pull from the DB based on that field only the
records that were added in the last 30 days?
|
|
|
Shawn Mason
|
Posted: 02/06/2003, 4:35 PM |
|
If using a backend that supports views, I would write the view that CC reads
to only return the records in the last 30 days. If you use one that
doesn't, then you just add a Where clause to the query.
--
Kindest Regards,
Shawn Mason,CCD,MCP
I.S. Software Design Associates
"WizyWyg" <wizywyg@nnnnhotmail.com> wrote in message
news:b1nqji$92r$1@news.codecharge.com...
> In CC, I want to be able to display only records that have been added to a
> DB in the last 30 days. In the table i have a field called "dateadded" and
> it uses the Date Format found in MySql (0000-00-00). How do I go about
> constructing a query to pull from the DB based on that field only the
> records that were added in the last 30 days?
>
>
>
|
|
|
Michael Rachow
|
Posted: 02/18/2003, 1:09 AM |
|
select field1, field2 from table
where to_days(curdate())-to_days(yourdatefield)) <= 30
Not tried but should do
regards
Michael
"Shawn Mason" <shawn@issda.com> schrieb im Newsbeitrag
news:b1uv1c$7u2$1@news.codecharge.com...
> If using a backend that supports views, I would write the view that CC
reads
> to only return the records in the last 30 days. If you use one that
> doesn't, then you just add a Where clause to the query.
>
>
> --
> Kindest Regards,
>
> Shawn Mason,CCD,MCP
> I.S. Software Design Associates
>
> "WizyWyg" <wizywyg@nnnnhotmail.com> wrote in message
>news:b1nqji$92r$1@news.codecharge.com...
> > In CC, I want to be able to display only records that have been added to
a
> > DB in the last 30 days. In the table i have a field called "dateadded"
and
> > it uses the Date Format found in MySql (0000-00-00). How do I go about
> > constructing a query to pull from the DB based on that field only the
> > records that were added in the last 30 days?
> >
> >
> >
>
>
|
|
|
|