4
As I can count the columns of a Mysql table using PHP, someone knows some command to do this?
I tried to do it this way but it didn’t work:
$sql4 = mysql_query("show fields from ".$tabela) or die('erro na query');
$rows4=mysql_fetch_array($sql4);
$total=count($rows4);
Remembering that the use of function
mysql_query()
nay is recommended due to various safety related reasons. Use PDO or Mysqli in place.– Kazzkiq
There is also this answer: http://answall.com/questions/13092/visualizar-quantidades-de-colunas-em-cada-tabela/13101#13101
– user6026