How can I count the columns of a MySQL table using PHP, does anyone know of any commands to do this?
I tried to do this but it did not work:
$sql4 = mysql_query("show fields from ".$tabela) or die('erro na query');
$rows4=mysql_fetch_array($sql4);
$total=count($rows4);