How do I handle MYSQL special characters?
This statement
mysql_query ("update users set active_date = ' 2012-3-13 ' where Computer_key = ' 18:a9:05:a1:3d:83 90:4c:e5:a1:36:2a '");
It cannot be updated because there is a colon or a space behind it.
What am I supposed to do with that? Thank you.
------Solution--------------------
You are mistaken, a colon or a space is not a special character. The success of the update may be because the database does not match the row
------Solution--------------------
If you are sure that the colon and the space are superfluous, then filter it.
PHP Code
$s =preg_replace ('/[:]/', ', $s);
------Solution--------------------
Click on this condition to see if there are any results.
------Solution--------------------
Escape, please.
------Solution--------------------
If it is a special character, it can be escaped with htmlentities. Note, spaces are definitely not special characters.