Jump to content

Display number of columns in table?


jamesjmann

Recommended Posts

NVM.

 

Just googled it and came up with this:

<?php

$link = mysql_connect("hostname", "username", "password");
mysql_select_db("database", $link);

$result = mysql_query("SELECT * FROM table ", $link);
$num_rows = mysql_num_rows($result);

echo "$num_rows Comments";

?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.