Database calls from single page
PermalinkI gave the C5 user access to the new schema. What's the best way to do a prepared insert to one of those new tables? Can I use the existing connection or should I create a new one? Can I use Loader::db() with my new schema?
Thanks!
Thanks for the link, though. I'll check it out.
The controllers do have a couple of methods like set('myVar', 'myValue) but it's mostly php stuff and not a lot c5 specific stuff to learn.
I think someonese tried to use Loader::db to access a different database but it didn't work. Not sure if it has changed but you might have to create a second adodb connection..
http://phplens.com/lens/adodb/docs-adodb.htm...
By the way, I don't recommend to add database calls in your single page, you should use controllers, models and single_pages whenever possible. Makes it easier to read the code for another developer..