Why Codeigniter doesn't make presentation data the same order Postgres does?

Hi Experts!

I'm facing a problem in making Codeigniter ressembles a Postgres query

The Codeigniter code (with tentatives)

	public function getPublicacoes($qtd = 0,$inicio = 0) {
             //EF 2015:
            $this->db->order_by("imagem_issuu DESC NULLS LAST");
            // Apresenta inicialmente todos com o livro eletronico ISSUU
    		if($qtd > 0){
    		return $this->db->get('tb_publicacoes');

Open in new window

Seeing the phppgadmin it looks fine

select * from tb_publicacoes ORDER BY imagem_issuu DESC NULLS LAST


But the site doesn't presents it in the desired order the NULL line is presented before in some cases:

Do you know what's going wrong or must be configured (in Codeigniter)  ?

Thanks in advance.
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

can you log DB queries that codeigniter is generating?
Does it use same DB encofing as pgadmin3?
gheist is right .  

You can control how db queries work when you make them directly.  When you use a framework, you're stuck.  Frameworks can be good to get started, but most application programming requires greater control over the code, as you're finding.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eduardo FuerteDeveloper and AnalystAuthor Commented:

It was a matter of my own confusion.

I had changed one method and the method fired was another!
Now everything ok!

Thanks for the assistance!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.