title: How to find the Previous MonthName using Monthname in mysql
body: <p>I am trying to find Stock of Previous Monthname.Here is my code.</p>
  
  <p>PHP:</p>
  
  <pre><code>$month='April'
  </code></pre>
  
  <p>MYSQL Table:</p>
  
  <pre><code>            Stock
  Bot_Name    March      April
  XYZ         25000      15000
  </code></pre>
  
  <p>SQL Query:<code>SELECT MONTHNAME($month,INTERVAL -1 MONTH) FROM STOCK.</code></p>
  
  <p>Expected Output:</p>
  
  <pre><code>March
  25000
  </code></pre>
  
  <p>Above Query is not working, I had no idea where I am going wrong.Please help me out.Thanks in advance.</p>