I am using SQL Server 2008. Here is my syntax.
$region =TbAuditRegion::findBySql('SELECT ROW_NUMBER() OVER (ORDER BY date_created DESC) AS number,name,date_created
FROM tb_audit_region')->all();
I wonder why field “number” didn’t come up ?
Any solution ?