How To build MySql Query to Get Call History from Database

Go To StackoverFlow.com

-1

I am newly hire intern in web development field and my senior ask me to build mysql query to draw out call history from database.

They want me to build query to get call record of: 1- Today 2- Yesterday 3- Last Week 4- this week

Just give me sample code or give me hint. we are working on mobile billing app. Please help me it is very necessary for me because i am a fresh intern. Thanks

2012-04-04 21:50
by user1313942


1

Your hint is the sql keyword "between".

2012-04-04 21:52
by James
Bro can you just give me one real world example.. - user1313942 2012-04-04 21:57


0

select fname, lname, tCalled, date from calls where date between now() and now() - INTERVAL 1 DAY;

if I am thinking right. I didn't test this

2012-04-04 21:57
by atrueresistance
thanks i see itwhether it works or not.. - user1313942 2012-04-04 22:10
Ads