Login   Register  
PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (11 months ago) RSS 2.0 feedNot enough user ratingsTotal: 445 This week: 1All time: 5,629 This week: 1,188Up
Version License PHP version Categories  
table-from-insert 0.1GNU General Public Lice...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
Picture of ELMINSON DE OLEO
Name: ELMINSON DE OLEO <contact>
Classes: 1 package by
Country: Dominican Republic Dominican Republic
Age: 34
All time rank: 30683 in Dominican Republic Dominican Republic
Week rank: 953 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:445All time:5,629
 This week:1This week:1,188Up
 User Comments (1)