How to create and access custom database table from Dashboard single page?
Permalink
I have a very simple need: To maintain a custom product info database in admin area and show it on the frontend with C5 5.7. So, let's say I have 20 products with name, weight and height. I need to be able to create new products, delete them and modify the parameters.
I have found lot of information about custom database tables and Dashboard single pages, in matter of fact I got single pages working ok. But I'm confused about new DB methdos (Doctrine) and how to actually *create* a new database table for my product. Do I need to use db.xml at all, or is it only related to the older C5 versions? If need it, what is the directory where I should place it? I don't feel needing packaging at all, since this is a single site - I'm not planning to publish it in Marketplace - so, how do I actually *create* those tables?
I know I have missed something, but it's just because of different C5 versions, legacy db methods and all that.
I have found lot of information about custom database tables and Dashboard single pages, in matter of fact I got single pages working ok. But I'm confused about new DB methdos (Doctrine) and how to actually *create* a new database table for my product. Do I need to use db.xml at all, or is it only related to the older C5 versions? If need it, what is the directory where I should place it? I don't feel needing packaging at all, since this is a single site - I'm not planning to publish it in Marketplace - so, how do I actually *create* those tables?
I know I have missed something, but it's just because of different C5 versions, legacy db methods and all that.
Starting from version 5.7.4, you can use this page:
http://documentation.concrete5.org/developers/packages/custom-datab...
But if that's all a bit scary, you can still use the db.xml file!
http://documentation.concrete5.org/developers/packages/custom-datab...
Drop the db.xml file right in your /packages/your_pkg_handle root. Concrete5 will install the table for your upon installtion!