title: how to echo out data using findAllBySql in active record
body: <p>This should return a list of about five locations.  It returns nothing with no errors. I've tested the sql using mysql workbench.  It returns the data just fine. Right now I'm writing the back end so I'm not concerned with using views or the dataprovider.  I'm just making sure my back end functions work.  So with that in mind, how would you return the data retrieved by findAllBySql?</p>
  
  <pre><code>class CashLogic
  {
    public function AllLocations()
      {
          $model = new Locations;
          $allLocations = $model-&gt;findAllBySql("SELECT name from locations");
          return $allLocations; 
      }  
  
  }
  
  class SiteController extends Controller
  {
    public function actionIndex()
      {
          $model = new CashLogic;
          $data = $model-&gt;AllLocations();
          return $data;
      }
  }
  </code></pre>