CodeIgniter Forums

Full Version: SQL order is wrong, how to correct it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Rubiz'[/eluser]
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?

:-(