let there is a table user(user_id int,user_name varchar)
I want to get all data along with its datatype in a single query in mysql.
select * from user;
describe user;
but these are two different query. I want the result in a single query.I want to get the result in php so that i can convert in a json i.e. json_encode;
Actually I want to get the result in the following format... only 1 row is available
[
{"attr_name":"user_id","value","5","attr-type":"int"},
{"attr_name":"user_name","value","6","attr-type":"varchar"}
]