Top Questions

  • 2.9 Years

    • Category : Mysql
    • Location : Chandigarh
    • Posted On : Feb 25, 2017

    You can match two column value using this code

     SELECT * FROM booking WHERE id='1' AND (STR_TO_DATE(`from`, '%d-%m-%Y') <='2017-02-24' AND (STR_TO_DATE(`till`, '%d-%m-%Y') >='2017-02-24')) AND service='test' AND status='0'

Add Your Answer

When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.