title: Which one is best mysql or mysqli or $wpdb for wordpress plugin
body: <p>I have created a plugin in wordpress after updated latest version of php my mysql_connect does not work.
  shows error like <code>PHP Fatal error occurred: Call to undefined function mysql_close()</code></p>
  
  <p>I know it is a PHP version problem so I need to migrate to <code>mysqli</code> but I have a doubt that which one is best <code>$wpdb query</code> or <code>mysqli query</code></p>
  
  <p>and refered that need to use <code>mysqli query</code> above php ver 4.1.3 , Should I check with </p>
  
  <pre><code>if(phpversion()&gt;=4.1.3){
  //use mysqli
  }
  else {
  //use mysql
  }
  </code></pre>
  
  <p>can I use like this or Is there any other way?</p>