1、mysql中有一字段名为 qysj 类型为datetime ,用THINKPHP如何分别获取年,月、日? $time=strtotime('数据库datetime');echo date('Y年m月d日',$time);
mysql 读取特定字段名 SELECT COLUNN_NAME FROM INFORMATION_SCHEMA.COLUMNSWHERE TABLE_NAME='TABLE1'AND COLUMN<;>;'X'
mysql如何获取主键的字段名 SELECT k.column_nameFROM information_schema.table_constraints tJOIN information_schema.key_column_usage kUSING(constraint_name,table_schema,table_name)WHERE t.constraint_type='PRIMARY KEY'AND t.table_schema='db'AND t.table_name=tbl'