Getting Distinct Date from mysql db with timestamp and around half million records

A date type is not a standard type? Well, you should stop. You know, deep holes and silly, stuff like that. And, to be clear, MySQL is FAR FAR FAR AWAY from being THE RDBMS.

Off Topic:

Who hired you A.D.A., if I may ask. :wink: Speak for yourself and let Rudy speak for him self. Itā€™ll be wiser and manlier. And a point on which Iā€™m sure Rudy would agree with me.

[QUOTE=itmitică;5131260]I shall leave to others to understand why the title of this thread ā€œGetting Distinct Dateā€ is not the same with ā€œGetting Distinct UNIX_TIMESTAMPā€:[/quote]this was addressed in post #12

steve didnā€™t want distinct dates at all, he merely wanted to list orders for a date range, and divide the list by date with a date heading

and right from the beginning of the whole thread, it has always been about integers, so all your yammering about standard sql now is an unnecessary diversion

the chances are remote that you will admit that you really didnā€™t understand the implications for your BETWEEN attempt

displaying the date for a group of orders was not the main issue, it was getting the right WHERE clause, and letā€™s face it, you failed there

ā€¦no integers here, so far.

Let me remind you post #1:

Yeah, itā€™s about date. Getting the date (day: Sat 3rd June) out of the timestamp alongside the order id column would prepare the data for the final report the OP wants.

[QUOTE=itmitică;5131296]Let me remind you post #1:[/QUOTE]let me remind you of post #12

and while iā€™m at it, let me sing you the song of my people

ahahahaha

okay, thatā€™s it, iā€™m done

you will of course want to have the last word, so do your best

:smiley:

Post #12 doesnā€™t change what the OP wants: he still only wants the day part from the orderDate column, along with the ID column.

And he wants a report which he can easily build after the query that returns the day part from timestamp.

You suggested him to make the processing of the UNIX_TIMESTAMP in php instead. Why? Since MySQL is guilty (read source) for the UNIX_TIMESTAMP joy (read issue). Is this how things are done: screw up in MySQL and FIX IT! in php? I seriously doubt it.

Itā€™s now my turn to act childishly?!

I believe I already admitted to that #13 error in my post #19.

That doesnā€™t mean that I wasnā€™t right about BETWEEN and days as integers, before and after that.

The OP is long gone and has a solution so I think this thread has served itā€™s purpose.