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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

How to alias feild in silverstripe?


Go to End


2 Posts   931 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.