ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:setcharset

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
v5:reference:connection:setcharset [2018/06/11 10:12]
dregad [setCharSet]
v5:reference:connection:setcharset [2018/06/11 10:14] (current)
dregad [Workaround for setting server side character set on MySQL] Use mysql utf8mb4 charset (#426)
Line 21: Line 21:
 ===== Workaround for setting server side character set on MySQL ===== ===== Workaround for setting server side character set on MySQL =====
 <code php> <code php>
-$SQL = +$SQL = "SET  
- "SET character_set_results = 'utf8', +    character_set_results    = 'utf8mb4', 
- character_set_client = 'utf8',  +    character_set_client     = 'utf8mb4',  
-character_set_connection = 'utf8', +    character_set_connection = 'utf8mb4', 
- character_set_database = 'utf8',  +    character_set_database   = 'utf8mb4',  
-character_set_server = 'utf8'");+    character_set_server     = 'utf8mb4'";
 $db->execute($SQL); $db->execute($SQL);
 </code> </code>
  
v5/reference/connection/setcharset.txt · Last modified: 2018/06/11 10:14 by dregad