Welcome Guest, Not a member yet? Register   Sign In
SQL order is wrong, how to correct it?

Hi all...

I'm with a big sql ordenation problem.
I have to order items by time of inclusion or editing in database.

In adding and editing act, I register the time like 'time' => time('h:iConfused');

My sql clause to order it is ORDER BY id, date_column, time_column DESC.
Most registers in time column are set as NULL 'couse it was defined later.

The first register added with time like this made the view list desappear...

Anyone could give me an example of how to reccord the time, if the name of the column can be "time", and how to ordenate it to request?


Theme © iAndrew 2016 - Forum software by © MyBB