Navigation: Development > Function Reference > Model >
Execute direct SQL.
App::Model()->custom_query(SQL);
For example: App::Model()->custom_query('SELECT * FROM app_pages');