getting a date array from a mysql database?

Posted by user296516 on Stack Overflow See other posts from Stack Overflow or by user296516
Published on 2010-06-11T09:59:37Z Indexed on 2010/06/11 10:02 UTC
Read the original article Hit count: 325

Filed under:
|

Hi guys, I have a database with date field is this format "2010.06.11. | 10:26 13"

What is need is a php array that would hold all the different dates, .i.e.

array[0] = "2010.06.09."

array[1] = "2010.06.10."

array[2] = "2010.06.11."

Currently I am doing it by selecting the whole table, then looping through the result and adding the date substr to an array if it is not already there.

But maybe there is a faster way? Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql