Welcome Guest, Not a member yet? Register   Sign In
Different column for csv_from_result function in written file?
#1

[eluser]jpganz[/eluser]
Hi,

I am using csv_from_result to export my result to a cvs file, still I am having a problem with it, I wanna export the results separated each column on my cvs per field returned from my DB,

I checked this post http://ellislab.com/forums/viewthread/214852/ and I tried the /t, but still no results, any other has this problem? I am using CI 2.1

here is my code

Code:
$this->load->dbutil();
$this->db->select('profile.profile_username,..... other fields');
$this->db->from('profile');
$this->db->join('client', 'client.id_profile = profile.id_profile', 'left');
$query = $this->db->get();
$enclosure = '';
$delimiter = "/t";
$newline = "\r\n";
$queryreturn = $this->dbutil->csv_from_result($query,$delimiter,$newline,$enclosure);

Any help would be appreciated.
Thanks


Messages In This Thread
Different column for csv_from_result function in written file? - by El Forum - 08-02-2012, 02:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB