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 (21)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-08-19 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 486 All time: 5,818 This week: 328Up
Version License PHP version Categories
table-from-insert 0.5GNU 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
  Performance   Level  
Name: Elminson De Oleo <contact>
Classes: 3 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 2x

 

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetestfiles (1 file)
Files folder imagetests (1 file, 3 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file example.php Example example using the class
Accessible without login Plain text file phpunit.xml Data Auxiliary data
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
Accessible without login Plain text file test.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file SqlToTable.php Class Class source

  Files folder image Files  /  testfiles  
File Role Description
  Accessible without login Plain text file test.txt Doc. Documentation

  Files folder image Files  /  tests  
File Role Description
Files folder imagecss (7 files)
Files folder imagefonts (1 file)
Files folder imagejs (3 files)
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  tests  /  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  /  tests  /  fonts  
File Role Description
  Accessible without login Plain text file glyphicons-halflings-regular.svg Data Auxiliary data

  Files folder image Files  /  tests  /  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  
 90%
Total:486
This week:0
All time:5,818
This week:328Up
User Comments (1)