Jump to content

about count by sql


Recommended Posts

<?php$link = mysql_connect("localhost","***","***");$sql = "SHOW COLUMNS FROM yourdb.yourtable";$result = mysql_query($sql,$link);while ($row = mysql_fetch_assoc($result)) {echo "<pre>";print_r($row);echo "</pre>";}echo "Number of columns: ".mysql_num_rows($result);mysql_close($link);?>


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...