Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dcount with Mysql query

Status
Not open for further replies.

patrickstrijdonck

Programmer
Jan 18, 2009
97
NL
Hi all,

I want to run a Mysql query that counts (with help of Dcount) the records that has been changed in the last 4 weeks, is this possible, if yes, can someone point me in the right directions??

 
assuming that you have a column that tracks the last update time for the row

Code:
select count (*) as cnt where lastupdate_col_name > date_sub(curdate(), interval 4 week)

dcount is not a familiar term to me in php.
 
oops

Code:
select count (*) as cnt [red] from tableName [/red] where lastupdate_col_name > date_sub(curdate(), interval 4 week)
 
oops, Dcount is from Visual Basic lol, sorry about that, Thanks for the tip, Now what i want is to echo the result, how can i show the result??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top