title: How to manually execute SQL query in CakePHP without a model
body: <p>I'm writing a quick throwaway method to import users from an old table to my new cake app. I've imported the old users table (old_users) into my cake app db. Basically I need to just do a select all form the old_users table, then loop through them and add them to the new users table using somehting like $newuser->create('old_username', 'old_password');</p>
  
  <p>However, I didnt want to create a model etc for the temp table as this import will only be run once. So my question is - how can I do a basic select to get all the users from this table from a cake method within the users controller. I was thinking somehting like this:</p>
  
  <pre><code>public function admin_importOldUsers() {
          $db = $this-&gt;getDataSource();
          $db-&gt;fetchAll('SELECT * FROM old_users');
      }
  </code></pre>
  
  <p>But it failswith the error:</p>
  
  <blockquote>
    <p>Call to undefined method UsersController::getDataSource()</p>
  </blockquote>
  
  <p>I cant find much in the docs on how to query another db table (without a model) from within a controller....</p>
  
  <p>Could anyone point me in the right direction?</p>
  
  <p>Thanks in advance</p>