So apparently i’ve stumbled upon a coding error when trying to select the time from my database.
SELECT * FROM `videos` WHERE `added_time` > AddTime( CurTime(), '14400 hour' )
is the code, i’m trying to select all the videos posted 10 days (14400 hours) ago using the “added_time” format, because it worked for my previous coding but in this one it work work.
Shown below is a link to the image showing how my database structure for videos are shown.
Edit: Previously i had this problem for retrieving and deleting bulletins posted 10 days ago, and this code worked, however this code apparently won’t work when trying to retrieve the videos :/ I don’t know why, they’re using the same format.
Get the actual date of
added_time, then get the the date from 10 days prior toNOW().WHERE DATE(added_time) = DATE_SUB(NOW(),INTERVAL 10 DAY)You can change it to
<=if you want to delete anything 10 days and greater.— Well now that we know one of them is a string and not a date field. Conver it.
After a little chat discussion and SQL Fiddlin’ I got the answer, and it works for him. Cheers.
http://sqlfiddle.com/#!2/63eef/14