title: WordPress MySQL select query to filter every post content that contains img tags without src attribute or an empty src
body: <h1>Issue</h1>
  
  <p>In order to determine the posts that contain <code>img</code> tags in their post content, but, without <code>img</code> <code>src</code> or the <code>src</code> attribute is not appear at all. </p>
  
  <p>I tried to find a solution for selecting all post contents by apply the following criteria:</p>
  
  <p>The <code>img</code> tag is a must to be appeared.</p>
  
  <p><strong>every post content must have html <code>img</code> tag without <code>src</code>, or at least with empty <code>src</code> like <code>&lt;img src=""</code></strong></p>
  
  <p>The below is what I have used to accomplish this task</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT
    ID, post_title, post_content 
  FROM 
    wp_posts 
  WHERE 
    post_content LIKE('%&lt;img % src=""%')
  ORDER BY ID DESC;
  </code></pre>
  
  <h1>Question</h1>
  
  <p>The previous solution worked as expected, but, I am looking for a better solution maybe using regular expression, because I think I have missed the post contents that contains <code>img</code> tags without <code>src</code> at all for example.</p>
  
  <p>I am trying to target all possible cases that accespt the previous criteria.</p>
  
  <h1>Sample Post Content Results</h1>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p align="center" style="text-align: center;"&gt;
    &lt;img title="%2525ED%252599%252594%2525EB%2525B3%2525B4%2525EC%2525A7%252591%2B%2525ED%252591%25259C%2525EC%2525A7%252580%2B%2525EC%252597%252585%2525EB%2525A1%25259C%2525EB%252593%25259C.jpg" src=""&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>Thanks.</p>