Add data to mysql on install addon
Permalink
Hello,
I'm trying to create one add-on for C5. I have the controller with the install() method and the db.xml with the necessary tables.
My problem is I want to insert some data to my tables when I'm installing the extension. How to achieve it?
Should I add the Insert queries inside install() method? Can I add the data in db.xml? What is the best approach?
Thanks!
I'm trying to create one add-on for C5. I have the controller with the install() method and the db.xml with the necessary tables.
My problem is I want to insert some data to my tables when I'm installing the extension. How to achieve it?
Should I add the Insert queries inside install() method? Can I add the data in db.xml? What is the best approach?
Thanks!
package/controller.php
/models/myModelFile.php
Hope that's useful