Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xE3\x80\x90Fir...' for column

I keep getting the error:-
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xE3\x80\x90Fir...' for column xxxx

Looking through the query it seems to be text such as:-
[Received email from: email@mydomain.com]

Im inserting the value into the query as a specified string into MySQL using PDO:-
$stXLS->bindValue(':description', 'Received email from: email@mydomain.com', PDO::PARAM_STR);

Open in new window


After searching around it seems to be an issue with the charset Im using (latin1_swedish_ci - default), however I have no idea how to fix it, does anyone have any suggestion of what collation I should be using?
Avatar of tonelm54
tonelm54

ASKER

Slight update, the value is a multi-line value which looks like it has non-standard characters such as Ã
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Vimal DM
Vimal DM
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial