Skip to content
GridPHP FrameworkGridPHP FrameworkGridPHP FrameworkDocumentation

Database Table Editor

The Table Editor automatically detects and loads all tables from your configured database. You can easily manage database connectivity and control table visibility by restricting or explicitly allowing specific tables.

  1. Database Connection To connect the tool to your database, configure the $db_conf array with your credentials. It supports multiple database engines including MySQL, PostgreSQL, Oracle, and SQL Server.

    $db_conf = array();
    $db_conf["type"] = PHPGRID_DBTYPE; // Options: mysql, oci8 (Oracle), mssql, postgres, sybase
    $db_conf["server"] = PHPGRID_DBHOST;
    $db_conf["user"] = PHPGRID_DBUSER;
    $db_conf["password"] = PHPGRID_DBPASS;
    $db_conf["database"] = PHPGRID_DBNAME;
  2. Table & Fields Selection The page automatically detects and lists all available tables from your database. Simply select the table you wish to work with & fields of the table you need then click “Generate Datagrid” to proceed.

    By default, the Table Editor exposes all tables within the connected database. You can fine-tune this behavior using Blocklists (Restricted) or Allowlists (Allowed). e.g.

    // Tables that should NOT be shown in the table editor
    $restricted_tables = array(
    "migrations",
    "failed_jobs",
    "user_passwords",
    "system_settings"
    );

    OR

    // ONLY these tables will be shown in the table editor
    $allowed_tables = array(
    "customers",
    "orders",
    "products",
    "invoices"
    );

Live Demo