title: Automatically build mySql table upon CSV upload
body: <p>Automatically build mySql table upon a CSV file upload.</p>
  
  <p>I have a admin section where admin can upload CSV files with different column count and different column name.</p>
  
  <p><br>
  which it should then build a mySql table in the db which will read the first line and create the columns and then import the data accordingly.</p>
  
  <p>I am aware of <a href="https://stackoverflow.com/questions/4143938/import-csv-file-directly-into-mysql">a similar issue</a>, but this is different because of the following specs.</p>
  
  <ul>
  <li>The name of the Table should be the name of the file (minus the extension [.csv])</li>
  <li>each csv file can be diffrent</li>
  <li>Should build a table with number of columns and names from the CSV file</li>
  <li>add the the data from the second line and on</li>
  </ul>    
  
  <p>Here is a <a href="http://avital.ws/7pys" rel="nofollow noreferrer">design sketch</a></p>
  
  <p>Maybe there are known frameworks that makes this easy.
  Thanks. </p>