On Wed, Dec 08, 2010 at 07:14:39AM -0800, Tommy Pham wrote: > On Tue, Dec 7, 2010 at 1:55 PM, Paul M Foster <paulf@xxxxxxxxxxxxxxxxx> > wrote: > > > > $this->db->select('title')->from('mytable')->where('id', $id)->limit(10, > > 20); > > > > What kind of internal magic they use to make this work, I don't know. I > > haven't examined their internals. > > > > Paul > > > > -- > > Paul M. Foster > > > > I've never seen the code nor used CodeIgniter but it might be > something like this: [snip] > > The only need I see for this is to build the query dynamically... > which should be very rare since all those function calls are > expensive, IMO. I agree. My advice for SQL is always to learn SQL rather than use a bunch of active record functionality. But I'm sure people think I'm just a curmudgeonly old turd. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php