CodeIgniter Forums
database caching error with query using LIKE - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: database caching error with query using LIKE (/showthread.php?tid=3736)



database caching error with query using LIKE - El Forum - 10-19-2007

[eluser]dardar[/eluser]
Everything is OK with codeigniter, just if I enable database query caching it returns blank screen:

Code:
$db['default']['cache_on'] = TRUE;
$db['default']['cachedir'] = "cache";

Maybe it's only server fault?

I'm using USB webserver, windows xp 64 OS, from http://www.usbwebserver.nl/ (you can test with it easaly - it's complete portablewebserver)


database caching error with query using LIKE - El Forum - 10-21-2007

[eluser]dardar[/eluser]
I found, what only one query is causing error (with caching disabled everything works nice):

Code:
SELECT distinct (artist.name), artist.id FROM artist RIGHT JOIN track ON artist.id=track.artist WHERE artist.name LIKE 'g%' ORDER BY artist.name LIMIT 10

This table is quite large (~ 1 million rows), but there are only 10 results, so is there any fix?