title: How to generate invoice number with special requirement using PHP or MySql
body: <p>how to generate invoice number such as below :</p>
  
  <pre><code>Invoice Number = MC1200001 
  
  MC : Company name
  12 : current year (Flexibel)
  00001 : auto increment (Flexibel - auto increment and will reset to 00001 again if year is 2013)
  </code></pre>
  
  <p>expected result :</p>
  
  <pre><code>current year 2012 :
  
  MC1200001
  MC1200002
  MC1200003
  .....
  
  year 2013
  
  MC1300001
  MC1300002
  MC1300003
  .....
  </code></pre>
  
  <p>Need your idea or solution for this problem.</p>
  
  <p>Thanks.</p>