• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add information to a csv_from_result that doesnt appear in the database

I have a export that needs to have a number in a column (same number for every row) that needs to be added to a csv from result but the number doesnt exist in the database.

Is there a way I can do a select and add the number into a column in the results

If it's the same number for every row then yes, just select a string.

select '123' as name_for_your_number, column_1, column_2, etc.

perfect, thanks very much.

CI code I am now using is:
$this->db->select("'1701' as `field2`", FALSE);

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.