Re: [msoda] SELECT, JOIN and WHERE query questions
Joe, Welcome to the CMS Builder forum! :)
As far as the generated code goes, you're right. We've made certain trade offs to make it accessible to non-programmers.
I myself will custom write MySQL queries when it makes sense to do so, such as when I need a lot of optimizations, or complex queries or joins. And lots of other times I'll just use the generated code because it's so fast and easy to do. :)
To answer your questions, there's no way to select limited columns, and very limited join capabilities with getRecords(). I'm adding some more advanced left join features for the next version, but if you're familiar with hand coding MySQL you may still find that easier.
The challenge for us is making a lot of the power of MySQL accessable to non-programmers without having to teach them MySQL. :)
One last note, you can see the queries CMS Builder generates by adding this option:
'debugSql' => true,
Also, there's a list of options for the getRecords() functions in the comments at the top of /lib/viewer_functions.php
And, you can hard code custom column types in the schema files with 'customColumnType'. See /data/schema/uploads.ini.php for an example.
Hope that helps, let me know if you have any other questions or feedback! :)
Dave Edis - Senior Developer
interactivetools.com