title: Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'No index used in query/prepared statement'
body: <p>When I run the following code, I get the error saying</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception
    'mysqli_sql_exception' with message
    'No index used in query/prepared
    statement'</p>
  </blockquote>
  
  <pre><code>$mysql = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database');
          if (mysqli_connect_errno()) {
              printf("DB error: %s", mysqli_connect_error());
              exit();
          }
  
      $get_emp_list = $mysql-&gt;prepare("SELECT id, name FROM calc");
      if(!$get_emp_list){
          echo "prepare failed\n";
          echo "error: ", $mysql-&gt;error, "\n";
          return;
      }
      $get_emp_list-&gt;execute();
      $get_emp_list-&gt;bind_result($id, $emp_list);
  </code></pre>
  
  <p>And this is the able schema --</p>
  
  <pre><code>--
  -- Table structure for table `calc`
  --
  
  CREATE TABLE IF NOT EXISTS `calc` (
    `id` int(12) NOT NULL,
    `yr` year(4) NOT NULL,
    `mnth` varchar(12) NOT NULL,
    `name` varchar(256) NOT NULL,
    `paidleave` int(12) NOT NULL,
    `balanceleave` int(12) NOT NULL,
    `unpaidleave` int(12) NOT NULL,
    `basesalary` int(12) NOT NULL,
    `deductions` int(12) NOT NULL,
    `tds` int(12) NOT NULL,
    `pf` int(12) NOT NULL,
    `finalsalary` int(12) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  </code></pre>