Archive for category CakePHP

Using mysql_query() within CakePHP

I always wanted to be able to get large datasets into CakePHP but since cake turns a 10MB db result into 120MB array, I had to come up with a solution to use the php mysql_query() function.

After a few unhelpful searches on google this is what I ended up with:

1
2
$db =& ConnectionManager::getDataSource('default');
3
$result = mysql_query('SELECT * FROM `users`;', $db->connection);
4

4 Comments