[eluser]chefnelone[/eluser]
I've got the answer for the characters:
Code:
$this->load->dbutil();
$queryForCsv = $this->db->query("SELECT * FROM membership_area");
$delimiter = ";";
$dataForCsv = $this->dbutil->csv_from_result($queryForCsv, $delimiter);
//NEW LINE TO SHOW CHARACTERS PROPERLY
$dataForCsv = chr(255).chr(254).mb_convert_encoding( $dataForCsv, 'UTF-16LE', 'UTF-8');
$pathCsv = '/clients.csv';
write_file($pathCsv, $dataForCsv);
...but now I JUST get 1 column in Exell, when it should be 5 columns. Something like:
myname, myphone, myage, mycity, mycountry (all in one cell instead of 5 cells )
I know the problem is
$delimiter = ";";
I've tried with:
* not setting a delimiter (2nd parameter of csv_from_result)
* and with :
$delimiter = ",";
but isn't working...