title: CakePHP - Calling another model causing "SQLSTATE[42000]: Syntax error or access violation"
body: <p>I'm new to cakePHP and i have looked everywhere for an answer, but couldn't find the reason for this.
  I'm trying to call a function in distant model, if i run the model directly, it works fine, but if i run it from another model, it cause 'Syntax error or access violation' error.</p>
  
  <p>Here's the code:</p>
  
  <p><strong>Cpanel Controller</strong></p>
  
  <pre><code>class CpanelController extends AppController {
  
      var $uses = array('Client');
  
      public function index() {
          $this-&gt;Client-&gt;index();
      }
  
  }
  </code></pre>
  
  <p><strong>Client Model</strong></p>
  
  <pre><code>class Client extends AppModel {
      public $useTable = 'users';
  }
  </code></pre>
  
  <p><strong>Client Controller</strong></p>
  
  <pre><code>class ClientController extends AppController {
      public function index() {
          echo "running";
      }
  }
  </code></pre>
  
  <p>When i run it from mysite/Client , it runs just fine.
  But if i try to load it from mysite/Cpanel , it throws:</p>
  
  <pre><code>SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index' at line 1
  </code></pre>
  
  <p>Thank you,</p>