Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to alias feild in silverstripe?

Go to End

2 Posts   878 Views


Community Member, 11 Posts

30 January 2014 at 6:32pm

Hi anyone can give me querying in silverstripe making feild alias, please thanx in Advance


Forum Moderator, 5523 Posts

3 February 2014 at 6:44pm

Alias? As in a database alias? If you're using the ORM you cannot alias the query fields. If you're using a direct DB query (such as DB::query()) you can alias it however your RDBMS does as this will simply return you an array of data.