TP inquiry day, month, year Data

// Get the date data 
Db :: table ( 'table') -> whereTime ( 'Times', 'Today') -> SELECT ();
 // Get the last data 
Db :: table ( 'table') -> whereTime ( 'Times', 'Yesterday') -> SELECT ();
 // Get week data 
Db :: Table ( 'Table') -> whereTime ( 'Times', 'week') -> SELECT ();   
 // Get the last data 
Db :: table ( 'table') -> whereTime ( 'Times', 'Last week') -> SELECT ();    
 // get the data of the month 
Db :: table ( 'table' ) -> whereTime ( 'Times',' month the ') -> SELECT ();   
 // Get the last month data 
Db :: table (' table ') -> whereTime (' times', 'month The Last ') -> SELECT ();      
 // obtaining this data 
Db :: table (' table ') -> whereTime (' times', 'year') ->SELECT ();    
 // Get the last data 
Db :: table ( 'table')   -> whereTime ( 'times', 'last year') -> select ();

Guess you like

Origin www.cnblogs.com/zyfeng/p/12216672.html
Recommended