How to register changes in your MySQL database structure with PHPCG

PHP CRUD Generator allows you to easily reload changes in the structure of your database
( Addition/Modification/Deletion of tables and/or fields).


When you make changes to your database or tables structure you may see some PHP warnings in the generator.
You can safely ignore them. Simply follow the instructions below to save your changes.
The PHP warnings will disappear as soon as your changes will be registered.

If you add, rename or remove a table

  • If the CRUD Generator is not opened in your browser (PHP SESSION has not yet started),
    Open the CRUD generator generator/generator.php
  • If the CRUD Generator is already opened in your browser (PHP SESSION has already started),
    Click the RELOAD DATABASE STRUCTURE button
    RELOAD DATABASE STRUCTURE button

In both cases, the Generator will auto-detect & apply the changes you made in your database.
You'll see some confirmation messages if you removed some tables.
If you just added new ones you'll find them in the table dropdown list.


If you add, rename or remove some fields inside a specific table

  1. Select your table in the Table dropdown list.
  2. Click the RESET "your_table" STRUCTURE button
    RESET TABLE STRUCTURE button

A modal will appear with instruction to choose if you want to reset your table structure only or the complete table data.

  • In the 1st case the generator will keep the fields settings that you chosed before (custom field names, filters, field types, select values, ...)
  • In the 2nd case the generator will reset all the fields settings.

If you change some table relations

  1. Click the "your_db" relationdropdown list
    relation dropdown list
  2. Click the RESET button at the bottom of the relations list
    RESET relation button

PHP CRUD tutorial main page