How to save unicode emoji in MYSQL in CodeIgniter

I am using codeigniter and trying to save 🚚 in MYSQL database table

The error I get is

Incorrect string value: '\xF0\x9F\x9A\x9A' for column 'post'
+4
source share
2 answers

1) Make sure you are using MYSQL 5.5, only then you can change the sorting to utf8mb4_something

2) Make sure the table columns that are going to receive emoji have their own utf8mb4_something settings

3) Edit the database.php configuration file

$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_unicode_ci';
+11
source

this link

http://webcache.googleusercontent.com/search?q=cache:http://andy-carter.com/blog/saving-emoticons-unicode-from-twitter-to-a-mysql-database

char_set utf8mb4, emojees :

✂️⤵️ ☺️☹️ ✊ ✌✋☝️ ✍❤️⛑ ⛹☘⭐️ ✨ ☄ ☀️ ⛅️ ☁️ ☂ ☔️ ❄️ ☔️ ☔️ ☔️ ☕️ ⚽️ ⚾️ ⛳️ ⛷ ⛸ ⛹

✈️ ⛵️ ⛴ ⚓️ ⛽️ ⛲️ ⛰ ⛺️ ⛪️ ⛩ ⌚️ ⌨ ☎️ ⏱ ⏲ ⏰ ⏳ ⌛️ ⚖ ⚒ ⛏ ⚙ ⛓ ⚔ ☠ ✒️ ✏️ ✏️ ✏️ ✏️ ✏️ ✏️ ♨️ ❗️ ❕ ❓ ❔! ️ ⁉️ ⚜ 〽️ ⚠️ ♻️ ❇️ ✳️ ❎ ✅ Ⓜ️ ♿️ 0⃣ 1⃣ 2⃣ 3⃣ 4⃣ 5⃣ 6⃣ 7⃣ 8⃣ 9⃣ ▶ ️ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ◀ ️ ⏫ ⏬ ➡️ ⬅️ ⬆️ ⬇️ ↗️ ↘️ ↙️ ↖️ ↕️ ↕️ ↔️ ⤵️ ⤵️ ⤵️ ⃣ ⃣ ⃣ ⃣ ⃣ ✖️ ✖️ ✖️ ✖️ ✖️ ✖️ ✖️ ✖️ ✖️ ✖️ ☑️ ☑️ ⚪️ ⚫️ ▪️ ▫️ ⬛️ ⬜️ ◼️ ◻️ ◾️ ◽️ ♠ ️ ♣ ♥ ♥ ️ ️ ️ ️ ⛄️ ☄ ♠ ️ ♥ ️ ♦ ️ ♣ ️ ▶ ️ ◀ ️ ☎️ ⌨ ✉️ ✏️ ✒️ ✂️ ↗️ ➡️ ↘️ ↙️ ☯ ✝ ☦ ☦ ☪ ☮ ☢ ☣ ☑️ ️ ️ ️ ✖️ ✖️ ✴️ ❇️ ️ ️ ️ ️ Ⓜ️ Ⓜ️ ▫️ ▫️ ⃣ ⃣ ⃣ ⃣ ⃣ ⃣ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ♻️ ️ ⛲️ ⛺️ ⛽️ ⛽️ ⛴ ⛔️ ⛅️ ⛈ ⛱ ⛄️ ⚽️ ⚾️ ⚾️ ⛸ ☾ ☾ ♛ ☾ ☾ ☾ ☾ ☾ ☾ ☾ ☾ ☾ ☾ ☾ ➬ ➬ ➬ ➬ ➬ ➬ ➬ ➭ ➮ ➯ ➲ ➳ ➵ ➸ ➻ ➺ ➼ ➽ ☜ ☟ ➷ ↶ ↶ ⏎ ⏎ ⏎ ⏎ ⏎ ⏏ ⎈ ⎌ ⍟ ❥ ツ ღ ☻

emojees utf8mb4

+2

All Articles