Tips to get all possible values ​​of ENUM enumeration column in MYSQL. _PHP Tutorial

WBOY
Release: 2016-07-13 17:29:30
Original
913 people have browsed it

Obtaining all possible values ​​of the ENUM (enumeration) column in MYSQL actually does not require any other functions to support this. You only need to use some SQL statements provided by MYSQL. For the sake of simplicity, here we take the MYSQL system table USER as an example to retrieve all possible values ​​of the SELECT_PRIV column. Method: SHOW COLUMNS FROM table_name LIKE enum_column_name The lowercase part needs to be changed according to your situation. Program: "; $enum_arr=explode("(",$enum); $enum=$enum_arr[1]; $enum_arr=explode(")",$enum); $enum=$enum_arr[0] ; $enum_arr=explode(",",$enum); for($i=0;$i
"; } ?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531700.htmlTechArticleGetting all possible values ​​of the ENUM (enumeration) column in MYSQL does not actually require any other functions to support this , just use some SQL statements provided by MYSQL. Here for simplicity...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!