PHP Classes
elePHPant
Icontem

Table from Insert: Generate create table SQL from an insert query

Recommend this page to a friend!
  Info   View files Example   View files View files (16)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-11-11 (9 months ago) RSS 2.0 feedNot enough user ratingsTotal: 468 All time: 5,728 This week: 1,142Up
Version License PHP version Categories
table-from-insert 0.2GNU General Publi...3.0Databases, Text processing
Description Author

This class can generate create table SQL from an insert query.

It takes as parameter a SQL statement of a query to INSERT a table record.

The class builds a SQL query statement to create the given table from the field names used in the INSERT query. It parses the SQL INSERT query to extract all the field names and types.

Innovation Award
PHP Programming Innovation award nominee
February 2014
Number 6
If you have a SQL INSERT query complete with all the fields names and values, you may recover the structure of that table from the query.

This class can do that by parsing the SQL INSERT query and generating a CREATE TABLE statement with all the field names and types based on the parsed query values.

Manuel Lemos
Picture of ELMINSON DE OLEO
  Performance   Level  
Name: ELMINSON DE OLEO <contact>
Classes: 1 package by
Country: Dominican Republic Dominican Republic
Age: 36
All time rank: 31403 in Dominican Republic Dominican Republic
Week rank: 1499 Up1 in Dominican Republic Dominican Republic Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imageclass (1 file)
Files folder imagecss (7 files)
Files folder imagefonts (1 file)
Files folder imagejs (3 files)
Accessible without login Plain text file example.php Example example using the class
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Data Auxiliary data
Plain text file table_from_insert.class.php Class class generate sql table sql from insert sql

  Files folder image Files  /  class  
File Role Description
  Plain text file sqltotable.class.php Class Class source

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file bootstrap-theme.css Data Auxiliary data
  Accessible without login Plain text file bootstrap-theme.css.map Data Auxiliary data
  Accessible without login Plain text file bootstrap-theme.min.css Data Auxiliary data
  Accessible without login Plain text file bootstrap.css Data Auxiliary data
  Accessible without login Plain text file bootstrap.css.map Data Auxiliary data
  Accessible without login Plain text file bootstrap.min.css Data Auxiliary data
  Plain text file table_from_insert.class.php Class Class source

  Files folder image Files  /  fonts  
File Role Description
  Accessible without login Plain text file glyphicons-halflings-regular.svg Data Auxiliary data

  Files folder image Files  /  js  
File Role Description
  Accessible without login Plain text file bootstrap.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.min.js Data Auxiliary data
  Accessible without login Plain text file npm.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 87%
Total:468
This week:0
All time:5,728
This week:1,142Up
User Comments (1)