The system generated every entry, be it table names, column names, or even relational data dynamically. The system uses various SQL queries to fetch data about the table in question, such as the number of columns, names of the columns, type constraints, foreign key constraints, record values and so on to seamlessly generate dynamic rows and columns for each DB entity. It also uses a bunch of keywords and cases from the table_alias.php
file to identify the datatype of the columns from the database and generate corresponding input types in Insert as well as Edit forms. The code uses a variety of reusable functions from the table_fuctions.php
. file to perform every task. It can be even said that the table_functions.php
is the system's backbone.
To be able to make this system your own, read carefully the comments of table_alias.php
and adjust the keyword according to your own needs.
-
Locate the config.php file and update the following values:
- Username
- Password
- Database name
- Server name
- Open the table_alias.php file.
- Navigate to the $columnAliases array.
- Create a switch case for every table in your database.
- Beneath each case, assign an associative array to $columnAliases, mapping original attribute names in the table to preferred display names.
Store the column of the related table that is to fetched using the foreign key. For example, category_name
is fetched using the foreign key category_id
from the table item_category
.