Add a field to Module Database
- Site administration -> Development -> XMLDB editor
- Find your module and click [Load]
- Click [Edit]
- At the Tables section, click the table you want to add field
- Click [New field] and fill in the detail
- [View PHP code]
- Select action: add field
- Select field/key/index: your_new_field_name
- Click "View"
- Copy the code to mod/your_mod/db/upgrade.php
- Change XXXXXXXXXX to new version number (e.g. 2011022301)
- Open mod/your_mod/version.php, change $module->version to the new version number
- Notification
- Done
Why in PHPMYADMIN in table mdl_mymodule the new fields are not available?
回覆刪除Can You change blogger language to english? Regards :)
回覆刪除