trolhita Posted April 8, 2014 Report Share Posted April 8, 2014 (edited) Boas pessoal, Estou num projecto em PHP e uso a Framework disponibilizada pela FUELPHP e usa o MVC. No entanto estou com duvidas no seguinte: -> Quero colocar numa variável o ID da query cuja data de registo for a ultimo. O Campo datareg está inserido nessa query. Alguém me pode ajudar? cumps Edited April 8, 2014 by trolhita Link to comment Share on other sites More sharing options...
I-NOZex Posted April 8, 2014 Report Share Posted April 8, 2014 (edited) procurar na documentaçao n custa... $entry = Model_Article::find('last', array('order_by' => 'datareg')); depois deve bastar fazer: $entry->id /* OU */ $entry::id http://fuelphp.com/docs/packages/orm/crud.html Edited April 8, 2014 by I-NOZex B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net Link to comment Share on other sites More sharing options...
trolhita Posted April 8, 2014 Author Report Share Posted April 8, 2014 Obrigado I-NOZex Link to comment Share on other sites More sharing options...
I-NOZex Posted April 9, 2014 Report Share Posted April 9, 2014 de nada 😉 B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now