Thanks. I got the information from INFORMATION_SCHEMA COLUMNS.
While retrieving the data from the result of query I faced following problem.
-
mysql> select select COLUMN_NAME, DATA_TYPE, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION from INFORMATION_SCHEMA.COLUMNS where table_name='account');
In coding I run the query using mysql_real_query() whose result is stored in
-
pResult = mysql_store_result(pMySQLDB);
-
fields = mysql_fetch_field(pResult);
-
my_ulonglong noOfRows = mysql_num_rows(pResult);
-
row = mysql_fetch_row(pResult);
it will not return any rows.
But in fields I get select COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION that I don't want.
I want the value like "amit, "MY_VAR_STRING", '10', '0'.
I want to store these data into another variable however not getting it.
Can you please tell me how do I fetch the data what I want from the query output or I am doing anything wrong?