mysql-Mysql中如何获取一条数据中所有字段的名称和值
Jun 06, 2016 am 09:38 AMmysql
有一个表User, 有字段id, name, password, mobile.
现在要获取User表中id=1的所有字段的名称保存为'key',其对应的值为'value'
例如有表中一条记录:
id name password mobile
1 test 123 138100138000
现在要获取这一条记录并保存为
key value
id 1
name test
password 123
mobile 13800138000

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

What are the application scenarios of Java enumeration types in databases?

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?

Performance optimization strategies for PHP array paging
