{"id":58110,"date":"2023-02-20T03:01:42","date_gmt":"2023-02-19T17:01:42","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58110"},"modified":"2023-02-19T19:18:34","modified_gmt":"2023-02-19T09:18:34","slug":"php-mysql-select-query-utf-8-return-values-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-mysql-select-query-utf-8-return-values-tutorial\/","title":{"rendered":"PHP MySql Select Query UTF-8 Return Values Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/MySql\/php_mysql_utf8_fix.gif\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP MySql Select Query UTF-8 Return Values Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/MySql\/php_mysql_utf8_fix.gif\" title=\"PHP MySql Select Query UTF-8 Return Values Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">PHP MySql Select Query UTF-8 Return Values Tutorial<\/p><\/div>\n<p>Yes, ever since embracing emojis, we&#8217;re on the lookout for gobbledegook.  And yes, a lot of the strategies we found on the &#8220;stumbled upon&#8221; <a target=_blank title='Useful link, thanks' href='https:\/\/stackoverflow.com\/questions\/3682409\/reading-utf-8-content-from-mysql-table'>Reading UTF-8 Content from MySql Table<\/a> we were familiar with, but one we weren&#8217;t, which was the one we discovered as gobbledegook in our Landing Page&#8217;s major dropdown outlining all the blog posts we&#8217;ve written at the RJM Programming WordPress Blog Website we&#8217;re running here, and you are reading now.<\/p>\n<p>The, was &#8230;<\/p>\n<p><code><br \/>\nJust Javascript Five Hundred Card Game Open Mis\ufffdre Progress Bar Tutorial (20210507)<br \/>\n<\/code><\/p>\n<p> &#8230; anti gobbledegook initiative scenario, with our changed tutorial_options.php cronatb\/curl morning scheduled Landing Page modifier, becomes &#8230;<\/p>\n<p><code><br \/>\nJust Javascript Five Hundred Card Game Open Mis\u00e8re Progress Bar Tutorial (20210507)<br \/>\n<\/code><\/p>\n<p> &#8230; improvement, came about from a consideration we have not thought about before &#8230; what about if MySql data contains UTF-8 data, and is part of a WordPress blog title, which ends up on the Landing Page big dropdown, already covered by a &#8230;<\/p>\n<p><code><br \/>\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; was inspired by checking off the excellent &#8220;already catered for&#8221; anti gobbledegook (emoji) checklist measures, leaving the PHP &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n $res =  mysql_query(\"set names 'utf8'\");<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; initiative, before any SQL SELECT type queries, idea, presented at <a target=_blank title='Reading UTF-8 Content from MySql Table' href='https:\/\/stackoverflow.com\/questions\/3682409\/reading-utf-8-content-from-mysql-table'>Reading UTF-8 Content from MySql Table<\/a>, which fixed our issue very nicely, thanks, in <a target=_blank title='tutorial_options.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tutorial_options.php-----------GETME'>our changed<\/a> <a target=_blank title='tutorial_options.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/tutorial_options.php-----------GETME'>tutorial_options.php<\/a> PHP crontab\/curl PHP helper.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58110' onclick='var dv=document.getElementById(\"d58110\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/mysql\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58110' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yes, ever since embracing emojis, we&#8217;re on the lookout for gobbledegook. And yes, a lot of the strategies we found on the &#8220;stumbled upon&#8221; Reading UTF-8 Content from MySql Table we were familiar with, but one we weren&#8217;t, which was &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-mysql-select-query-utf-8-return-values-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12,37],"tags":[299,367,385,4214,680,827,932,997,1018,1866,1186,1319,1352],"class_list":["post-58110","post","type-post","status-publish","format-standard","hentry","category-database","category-elearning","category-tutorials","tag-database-2","tag-dropdown","tag-emoji","tag-gobbledegook","tag-landing-page","tag-mysql","tag-php","tag-programming","tag-query","tag-select","tag-sql","tag-tutorial","tag-utf-8"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58110"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=58110"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58110\/revisions"}],"predecessor-version":[{"id":58116,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58110\/revisions\/58116"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}