1. Go to this page and download the library: Download codewdev/tablegenerator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use CodeWdev\TableGenerator\TableGenerator;
"users", [
"first_name" => "VARCHAR(10) NOT NULL",
"last_name" => "VARCHAR(255) NOT NULL",
"email" => "VARCHAR(255) UNIQUE NOT NULL",
"password" => "VARCHAR(255) NOT NULL DEFAULT 0"
]);
//command to create the table
$user_data->create();
//adding columns to the table
$user_data->addColumn([
"document" => "VARCHAR(10)",
"company" => "VARCHAR(50) NOT NULL"
]);
//
//deleting a column
$user_data->dropColumn("company");
//deleting a table
$user_data->drop();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.