Welcome Guest, Not a member yet? Register   Sign In
Simple Query problem
#1

[eluser]Ngulo[/eluser]
hi all

i'm trying to select data in this way but it is,i guess, really wrong:
Code:
$order_1=$this->db->order_by("hours", "asc");
$limit_1=$this->db->limit(1);
$data['query']=$this->db->get('table',$order_1,$limit_1);

which is the better way to write this simple query....i did can't find an example Sad

thanks for supporting Wink
#2

[eluser]n0xie[/eluser]
Something like this?
Code:
$data['query'] = $this->db->order_by("hours", "asc")->limit(1)->get('table');
#3

[eluser]Ngulo[/eluser]
perfect!!! really thanks n0xie Wink




Theme © iAndrew 2016 - Forum software by © MyBB