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

#1
[eluser]nigelb[/eluser]
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

#2
[eluser]kgill[/eluser]
If it's the same number for every row then yes, just select a string.

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

#3
[eluser]nigelb[/eluser]
perfect, thanks very much.

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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