title: WHERE CURDATE() < end_date AND WHERE title LIKE '%test%'
body: <p>I'm building the news site.</p>
  
  <p>I am trying to print only the news that is inside of the right end_date , but some how i cant get it to work</p>
  
  <pre><code>$sql2 = "SELECT * FROM p_news WHERE CURDATE() &lt; end_date AND WHERE title LIKE '%$search%'";
  </code></pre>
  
  <p>when i try to echo the sql, and test it in phpmyadmin</p>
  
  <p>it get this error</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near 'WHERE title LIKE '%test%' LIMIT 0, 30' at line 1</p>
  </blockquote>