[eluser]Rey Philip Regis[/eluser]
Hi guys,
I need your help, I need to know how to use alias in active record.
SQL is this: I want that the key of the array is "name" just what I specified in the alias not the key "description".
Code:
select
hpideterminanttype.description as `name`
from
hpideterminanttype
where
hpideterminanttype.stat = '1'
Output should be:
array(
[0] => array
(
[name] => 'ONSET'
)
[1] => array
(
[name] => 'LOCATION'
)
)
Not:
array(
[0] => array
(
[description] => 'ONSET'
)
[1] => array
(
[description] => 'LOCATION'
)
)
Thanks in advance......