title: Compare MySQL string and get the allowed values
body: <p>I am facing a problem regarding a string comparison in MySQL. </p>
  
  <p>I have the following table, </p>
  
  <pre><code>res_id  | image_min_allowed_dimension | canvas_dimension
  1         400x500                       8x10
  2         800x600                       11x14
  </code></pre>
  
  <p>As you can see in this table, 
  image_min_allowed_dimension column has 2 sets of record. Ans also canvas_dimension has 2 sets
  Now, my goal is to get these 2 sets of record with a given value for image_min_allowed_dimension. 
  Say, if I give 1024x768 for image_min_allowed_dimension in the PHP script it will give me the 2 sets of record from canvas_dimension field.</p>
  
  <p>The probable algo would be, </p>
  
  <p>Fetch All Records as canvas_dimension 
  IF image_min_allowed_dimension is Less than or equal to a given value(i.e, 1024x768)
  ELSE IF the given value is greater than image_min_allowed_dimension then return nothing.</p>
  
  <p>But as the fields are varchar, how can I achieve that.? 
  Please help.</p>