title: mysql split multiquery string with php
body: <p>I want to make a database restore function that will parse a dump made with phpMyAdmin and will execute all of the queries.</p>
  
  <p>I already have a MySQL class that does the query, but it only knows how to do a single query.  I am looking of a way to split the file content into single queries.</p>
  
  <p>I tried to play with preg_split ... but didn't managed to get it to work.</p>
  
  <pre><code>$queries = preg_split('/[(.+);\s*\n/', $content, -1, PREG_SPLIT_NO_EMPTY);
  </code></pre>
  
  <p>I am not very good with regular expressions.  Is there a way I can accomplish my goal?</p>