⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Select column with an allias in set_model



elfuego1

elfuego1
  • profile picture
  • Member

Posted 03 March 2013 - 01:01 AM

Hi,

 

I need to select each column from table twice. One for form field and second for hidden form field.

 

in set_model I select:

{$this->table_name}.FIELD1, {$this->table_name}.FIELD1 AS ONE,

{$this->table_name}.FIELD2, {$this->table_name}.FIELD2 AS TWO,

{$this->table_name}.FIELD3, {$this->table_name}.FIELD3 AS THREE

 

Am I doing something wrong or set_model doesn't support column allias names?

Or maybe there is some othere way to achieve this?