• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.