title: Wordpress Loads but query gives error message
body: <p>I'm using Wordpress to query the database and it worked fine for a long time. All of a sudden I'm getting error messages and it can't connect. I have some simple code like the following:</p>
  
  <pre><code>&lt;?php
  $qry = "Select * from dj_feedback_summary";
  $result = mysql_query($qry);
  ?&gt;
  </code></pre>
  
  <p>I get the following results:</p>
  
  <blockquote>
    <p>Warning: mysql_query(): No such file or directory in
    /home/name/website.com/wp-content/plugins/exec-php/includes/runtime.php(42)
    : eval()’d code on line 3</p>
    
    <p>Warning: mysql_query(): A link to the server could not be established
    in
    /home/name/website.com/wp-content/plugins/exec-php/includes/runtime.php(42)
    : eval()’d code on line 3</p>
  </blockquote>
  
  <p>I don't understand why this is happening if I already have a connection that works with the database in my <code>wp-config.php</code> file.</p>
  
  <p>If I make the code say the following:</p>
  
  <pre><code>&lt;?php
  echo 'Hello World';
  ?&gt;
  </code></pre>
  
  <p>The output is correct so I know it isn't a plugin issue to display the PHP.</p>
  
  <p>I'm using Wordpress 4.4 if it matters.</p>
  
  <p>EDIT: It works if I just execute a query like in the suggested answer but why won't it work anymore with the regular <code>mysql</code> query?</p>