PHP Classes

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-01-16 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 451 All time: 5,685 This week: 1,049Up
Version License PHP version Categories  
table-from-insert 0.1GNU 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.

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
Name: ELMINSON DE OLEO <contact>
Classes: 1 package by
Country: Dominican Republic Dominican Republic
Age: 35
All time rank: 31033 in Dominican Republic Dominican Republic
Week rank: 1624 Up2 in Dominican Republic Dominican Republic Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example example using the class
Plain text file table_from_insert.class.php Class class generate sql table sql from insert sql

 Version Control Unique User Downloads Download Rankings  
 0%Total:451All time:5,685
 This week:0This week:1,049Up
 User Comments (1)