Re: retrieving-your-data.html: DboSource::fetchAll()

2012-05-04 Thread majna
That's prepared statements http://php.net/manual/en/pdo.prepare.php used for better performance (compiled query plan can be cached) On Thursday, May 3, 2012 5:37:22 PM UTC+2, johnericsutton wrote: > > At the end of > http://book.cakephp.org/2.0/en/models/retrieving-your-data.html are some > exam

retrieving-your-data.html: DboSource::fetchAll()

2012-05-03 Thread John Sutton
At the end of http://book.cakephp.org/2.0/en/models/retrieving-your-data.html are some examples of the use of DboSource::fetchAll() : $db = $this->getDataSource(); $db->fetchAll( 'SELECT * from users where username = ? AND password = ?', array('jhon', '12345')); $db->fetchAll( 'SEL