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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

How to alias feild in silverstripe?


Go to End


2 Posts   1369 Views

Avatar
anudeepgi

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

Avatar
Willr

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.