The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Is there a way of finding the last 10 records added to the database or records added in the last 14 days etc.. either way will do !
In ASP i would have used: <%datenow = DateAdd("D", -14, date) date3= FormatDateTime(datenow,vbshortdate) date2= year(date3) &"/"& month(date3)&"/"&day(date3) %> <%RS.Open "SELECT * FROM table1 WHERE date => '" & date2 & "' order by date", con, 3, 3 %> Thanks |
#2
|
|||
|
|||
![]()
Well... This query will select table entries from withing the last 14 days. Assuming that your date_column is a datetime type.
SELECT * FROM `TBL_NAME` WHERE TO_DAYS(NOW()) - TO_DAYS(date_column) <= 14 |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|