Welcome Guest, Not a member yet? Register   Sign In
Language problem with codeigniter
#1

[eluser]Unknown[/eluser]
Hello guys , i'm kindly new in codeiginter and i have problem when i use arabic language with codeigniter
have database called jobs
and i use the following code to enter the data into the database
Code:
$sql = "SELECT * FROM jobs WHERE position = ?";
$query = $this->db->query($sql,$job);
return $query->result();

then
Code:
if($result = $this->database->search_for_job('دكتور'))
{
$data['records'] = $result;
}
$this->load->view('home_view',$data);

and the following error output to me
=======================================================
Error Number: 1267

Illegal mix of collations (utf8_bin,IMPLICIT) and (cp1256_general_ci,COERCIBLE) for operation '='

SELECT * FROM jobs WHERE position = 'دكتور'

Filename: C:\wamp\www\jobs_website\system\database\DB_driver.php

Line Number: 330
======================================================

Sorry but i can't figure out the problem here
any suggestions
#2

[eluser]Amitabh Roy[/eluser]
Seems you are using Mysql 4.1, its a bug in mysql 4.1

The solution is to upgrade MYSQL version or set the character set of the table to utf8




Theme © iAndrew 2016 - Forum software by © MyBB