Welcome Guest, Not a member yet? Register   Sign In
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);




Theme © iAndrew 2016 - Forum software by © MyBB