I am using PDO for php and. Parameters are binding right. However when I check my mysql-query.log on CentOS 5.6
I get the following
UPDATE
^ M site_folder_pages ^ M
SET
^ M ^ M title = 'Schanz, Hermann',
^ M `desc` = 'Telefonnummer, E-Mailadresse',
^ M declared_encoding = NULL,
^ M detected_encoding = NULL,
^ M word_count = '230',
^ M last_checked = NOW(),
^ M date_modified = NOW() ^ M
WHERE ^ M url_hash = '0001843c8b7bb28b46323fd1e8a3efa5' ^ M
AND site_id = '52f2b2940f79c1f7d623b066b2bce2e5'
Having this, I am not really sure if this query was executed right or the "^M" character was only added on the log file and not the actual query.
Doing a quick search in google I also find queries with the same characters: Query with ^M
Is it just on the log? or is it really executed with that character hence there was an error during the execution?
^M
is the on-screen representation of a carriage return in many UNIX terminals. What you're probably looking at is a log file and/or query string containing Windows-style line endings (), but reading it in UNIX mode (
) and thus the carriage returns (
=
^M
) are showing up.
Since both and
are whitespace characters, MySQL ignores them, so it won't cause an actual problem.
^M
corresponds to chr(13)
, also represented as , and is the carriage return.
CHR(10)
(or
, the new line character)chr(13)
. chr(10)
(or also as " "
, return and new line).MySQL will ignore all of these characters as whitespace, so you don't have to worry.