title: mySql Max function ot returning exact result
body: <p>I don't know why i am not getting the exact result </p>
  
  <pre><code>SELECT MAX(MID(order_id,3,20)) As Id FROM `tbl_orders` WHERE `domain_id`=2 
  +------------+
  |   id       |
  +------------+
  |  10121452  |
  +------------+
  </code></pre>
  
  <p>Even i tried the same function without MID function </p>
  
  <pre><code>SELECT MAX(order_id) As Id FROM `tbl_orders` WHERE `domain_id`=2 
  +------------+
  |   id       |
  +------------+
  | Hy10121452 |
  +------------+
  </code></pre>
  
  <p>any my database have highest order</p>
  
  <pre><code>+--------+------------+
  | id     |  order_id  |
  +--------+------------+
  | 1      | Hy10121452 |
  | 2      | Hy10121453 |
  | 3      | Hy10121454 |
  | 4      | Hy10121455 |
  | 5      | Hy10121456 |
  | 6      | Hy10121457 |
  | 7      | Hy10121458 |
  | 8      | Hy10121459 |
  | 9      | Hy10121460 |
  +--------+------------+
  </code></pre>
  
  <p>i have to increment in the highest number to generate new order No.
  Is i am doing something wrong? </p>