get the size of all columns of a table in mysql
<p>Hi I have used sql query to find the size of column of a table in mysql.This code works for find the size for one column. But i want to get size of all columns of a table in mysql.</p>

<pre><code>$sql="SELECT column_name,  character_maximum_length FROM   information_schema.columns 
     WHERE  table_name = 'user' AND column_name = 'Country'";
</code></pre>

<p>if i have tried this code but it did not work:-</p>

<pre><code>&lt;?php

    $sql="SELECT CONCAT(CHARACTER_LENGTH(col1,col2)) FROM tableName 
             WHERE col1 = 'Country' , col2 = 'email'  AND tableName='user'";
    $r= mysql_query($sql);
    $v=mysql_fetch_row($r);
    echo $v[0];
    echo $v[1]; 
?&gt;
</code></pre>