The Database Tables

There are three simple rules for your database tables:

1. The main ID field in each table must always be called 'id' and must be an auto-incrementing field. (This is a standard MySQL field type. It automatically creates a new, unique number each time you make a new entry.)

2. There must also be a field called 'name' in every table, if you want to use it as the basis for a dynamic drop-down box on any form.

3. You also need a 'submit' field for holding states, and things like that.

Otherwise you can have whatever fields you like, and name them anything your database system is happy with. Everything else is handled by the CRUD model, for any controller/ table pair designed along these lines.

Was this article helpful?

0 0

Post a comment