How can I obtain the enumerated values in mysql?

Source: Internet
Author: User
How can I obtain the enumerated values in mysql? Array & nbsp; (& nbsp; [0] & nbsp ;=& gt; & nbsp; 1 & nbsp; [1] & nbsp ;=& gt; & nbsp; storylok & nbsp; [2] & nbsp ;=& gt; & nbsp; lele1989 & nbs how to obtain enumerated values in mysql?
Array ([0] => 1 [1] => storylok [2] => lele1989 [3] =>? )
Why is the retrieved enumeration type question mark? I can see it in the mysql console. The character set PHP and mysql are both utf8. how can I obtain the enumerated value.

 Header ("Content-Type: text/html; charset = utf-8 ");
$ Host = "localhost ";
$ User = "root ";
$ Password = "";
@ $ Conn = mysql_connect ($ host, $ user, $ password) or die ("database connection failed. Please check the database configuration! ". Mysql_error ());

$ TableName = "viuoo ";
Mysql_select_db ($ tableName, $ conn) or die ('database table selection error. Please check whether the database table name is correct! ');
Mysql_query ("set names 'utf-8 '");
$ Dm = "SELECT * FROM user ";
$ Result = mysql_query ($ dm, $ conn );
While ($ res = mysql_fetch_row ($ result )){
Print_r ($ res );
}

?>
Mysql php utf8 database shared :? 1? [1]? =>? Storylok? [2]? =>? Lele1989? [3]? ==> ???) Why is the retrieved enumeration type question mark ?? In mysql control... 'data-pics = ''>
------ Solution --------------------
Mysql_query ("set names 'utf-8 '");

Modify

Mysql_query ("set names 'utf8 '");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.