title: Convert MySQL .sql file to MS Access Database
body: <p>is there a way out to convert .sql to access database using php.
  i have tried exporting the sql to csv format and then converting csv to access but only the data comes the column names are gone.</p>
  
  <pre><code>$sql=mysql_query("SELECT * FROM attendance WHERE (year = '" . mysql_real_escape_string($_SESSION['year']) . "') and ( branch= '" .
          mysql_real_escape_string(($_SESSION['branch'])). "') and ( sem= '" . mysql_real_escape_string(($_SESSION['sem'])). "') and (sec= '" .
          mysql_real_escape_string(($_SESSION['sec'])). "')"); 
  print "&lt;body background='bg.jpg'&gt;"; 
  Print "&lt;br&gt;&lt;br&gt;&lt;BR&gt;&lt;center&gt;&lt;table border cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;idno&lt;/th&gt;&lt;th&gt;name&lt;/th&gt;&lt;th&gt;subject&lt;/th&gt;&lt;th&gt;Held Classes&lt;/th&gt;&lt;th&gt;Attended Classes&lt;/th&gt;&lt;/tr&gt;";  
  while($data=mysql_fetch_array( $sql ))   { 
      echo "&lt;tr&gt;&lt;td&gt;".$data['idno']." &lt;/td&gt;&lt;td&gt;".$data['name'] . " &lt;td&gt;".$data['subject']." &lt;/td&gt;&lt;td&gt;".$data['heldcls'] . "&lt;td&gt;".$data['attendcls']." &lt;/td&gt;"; 
  } 
  Print "&lt;/table&gt;&lt;br&gt;&lt;br&gt;&lt;form action = excel.php method = POST&gt;&lt;input type = 'submit' name = 'submit' Value = 'Export to excel'&gt;&lt;/form&gt;&lt;/center&gt;";
  </code></pre>