New version: http://mhordecki.wordpress.com/2008/06/29/scaffolding-maintenance-release/
Hello there. At the moment, as you can see, I’m ditching build.py case I’m a bit busy with other projects.
When writing my another PHP project (powered by Kohana, of course), named Milion Kostek (http://www.milion.rubiks-cube.c0.pl, non-English), I realized that, in fact, I’ve got nothing but one free hosting account shared with my friend shipped with one MySQL database to share between us. It’s unevitable that, when multiple systems use one database, each one must use table prefixes to avoid naming collisions.
Unfortunately, Kohana framework has got some flaws in field of table prefixes. Of course, such thing as $db->select(‘users.id’) works perfectly, but $db->groupby(‘users.id’) does not. What’s more, when I need to use sql functions, like $db->select(“concat(tableA.X, ‘glue’, tableB.Y), I’m simply forced to write SQL query by hand. Even if I add table prefix manually, it will all fail cause query builder’s select method explodes it’s parameter by ‘,’ , so my concat call would be torn apart).
It’s easy to predict that I’ve ended up in writing my own query builder
. I almost complete, yet documentation is missing. As soon as I write it I will upload it here.
Nevertheless, using my Query library I could enchant my Scaffolding module. Here are the main changes:
- Full support for table prefixes (;) )
- Key fields can be now sql expressions (like my favourite concat)
- Pagination in managementpage
- Lots of minor bugfixes
Hope it will be useful for someone
Download link: http://rapidshare.com/files/101560292/scaffolding.zip.html.
How to install:
- Just drop it in modules/ folder in your Kohana app
- Enable it in $config['modules'] in your config.php (thanks nevez
) - Go to yoursite.com/scaffolding .