mosbth/cdatabase — pull request #1 by nuvalis (2014-05-15 22:07:28+00:00)
Title: Added extra builder parts [Limit and Offset]

Hi, added limit and offset for easier queries in kmom710. I thought that I should share it back and maybe it can be of use for other students.

Example of how it looks like. You can see more in webroot/testDatabaseQueries.php line ~186

$db->select("*")->from('test')->limit('1')->offset('2');

I don't know if intval() is necessary but I included it anyway. Could cause issues if someone is trying to insert a string with characters [A-z] only, it will return 0 in that case.

I made a few tests also, I think it should work properly.