How can I check to make sure there are no records in MySQL date by day instead of 1 day interval

Hello,

I have been working with this mySQL code...

SELECT *
FROM video_searches
WHERE video_last_update_date < DATE_SUB(NOW(), INTERVAL 1 DAY)

but I just want to pull videos that just don't have a update from today's date and not within 24 hours which the code above seems to be doing.

Thanks,

Brian
brihol44Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Deepak LakkadCommented:
Hi,

Can you please explain the problem ...?

The query is returning those records which are updated before 24 hours (1 day) ...

Which records do you want to get?

- Deepak Lakkad
0
Tomas Helgi JohannssonCommented:
Hi!

I this will do the trick :)

SELECT *
FROM video_searches
WHERE video_last_update_date <> Date(NOW())

Open in new window


Regards,
    Tomas Helgi
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.