php - Selecting new records by datetime -


I am trying to select the records that have a readet within the previous year

  $ step = date ('YMD HK: I: S', MKTMT (0, 0, 0, date ("M"), date ("D"), date ("Y") - 1)); $ Sqlstmt = "SELECT * FROM #__mytable WHERE id =". $ Uid "And recdate>" $ Goodate '' ';   

But I'm not getting any records.

What am I doing?

  $ sqlstmt = "select * to #__mytable WHERE id =". $ Uid. "And recursive & gt; ADDDATE (CURDATE (), INTERVAL-1 YEAR);    

Comments