CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 What would be the best way to make a What's New section?

Print topic Send  topic

Author Message
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?
> >
> >
> >
>
>


   


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

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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