need help

#1
[eluser]Unknown[/eluser]
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);
who can help me translate this to sql syntax
Is it right "select * from mytable where id=$id $offset $limit"

#2
[eluser]xwero[/eluser]
select * from mytable where id=$id limit $offset $limit
to be correct Smile

#3
[eluser]Merolen[/eluser]
Shouldn't it be

Code:
select * from mytable where id=$id limit $offset , $limit

with a , between offset and limit

#4
[eluser]xwero[/eluser]
Merolen wins Smile

#5
[eluser]Merolen[/eluser]
Yes! What do I win? Sorry, off topic. I'm sure you just forgot the , Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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