title: How to find the length of a string in MySql store procedure?
body: <p>i am writing a query containing FIND_IN_SET and the where condition is as follows</p>
  
  <pre><code>WHERE 
      AND pmd.searchable =1
      AND FIND_IN_SET( categorie_heading,categoryheading) 
      AND FIND_IN_SET( categorie_discription,catdiscription) 
      AND FIND_IN_SET( Brand,categorybrand) 
      AND price
          BETWEEN minprice  
              AND maxprice  
  GROUP BY p.prod_id;
  </code></pre>
  
  <p>i want all categoryheading value if the value is not set for categoryheading(if the value is null or empty string) but FIND_IN_SET obtains the value specified by categoryheading so i thought of obtaining the string length and if the length is greater than zero then concatenate the required where condition ... </p>
  
  <p>Please help me to solve this, Please let me know if there is any other way to do this.  </p>