computer






 

Question by  worker499561 (15)

How do I convert special characters into a my SQL database?

 
+7

Answer by  Christian9247 (5042)

This is tricky. First you need to change the ending options of your database encoding. Use the UTF-8 option in your phpAdmin panel. This is so your script can properly format and understand special characters used in various coding.

 
+6

Answer by  knightmare (1231)

Certain characters need an escape character, which is a character that tells the database to not treat it as it's usually intention. Sometimes this could be backslash, hyphen, etc.

 
+6

Answer by  RepairItMan (419)

You will need to change the encoding options for that database. You can easily to this using phpMyAdmin. Just go to the 'Databases' tab, and then look for 'Encoding'. You will want to use 'UTF-8' option. This will make it so that scripts that use special characters will be properly formatted into the database.

 
+5

Answer by  Sarah33 (32)

you have to add a SLASH before those special chars. This is called "slashing". In most programming languages you have dedicated functions for this. For example in PHP, the function "addslashed" does this: $uri = addslashes($uri); $result = mysql_query(" INSERT INTO logfile_records (uri, date) VALUES ('$uri', '$the_date')");

 
You have 50 words left!