title: Check if wordpress query was successfull or not
body: <p>I am executing a query which is as follows.</p>
  
  <pre><code>global $wpdb;
  
  $table_name = $wpdb-&gt;prefix . 'prousers';
  
  $results = $wpdb-&gt;get_results("INSERT into $table_name 
                            (name,gender,mailid,empid,address,phone)
                             VALUES(
                             '".$InputName."','".$gender."','".$InputEmail."',
                             '".$emp_id."','".$address."','".$phn_num."'
                             )", OBJECT );
  </code></pre>
  
  <p>Everything is going well. I just wanted to validate it, so I did following:</p>
  
  <pre><code>if($results) { 
      echo'success';
  } else {
      echo "error";
  }
  </code></pre>
  
  <p>Values are correctly getting inserted into the table, but it is showing a fail message (it prints "error").</p>
  
  <p>Why is this?</p>