• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
when sql query has utf character in it, codeigniter doesn't execute query

#1
[eluser]aman_tuladhar[/eluser]
Codeigniter ver. 1.63

database.php has this setting
config > database.php
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

MySQL database and table in it has collation as utf8_general_ci

when I issue query like this
$query = $this->db->query("select product_id from tbl_product where title = 'Consumíveis'");
echo $query->num_rows();

It gives 0 no. of rows,
when I run the same query inside phpmyadmin it gives 2 no. of rows as it's result.
Being surprise, I tested the query with native php and mysql function, and it also display no. of records as 2.

So I am wondering if it is codeigniter bug or I have missed something some where in codeigniter setting ?
Any idea ?


Messages In This Thread
when sql query has utf character in it, codeigniter doesn't execute query - by El Forum - 08-21-2008, 07:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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