Jump to content

about count by sql


abes_nitya
 Share

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);?>

http://dev.mysql.com/doc/refman/4.1/en/show-columns.htmlhttp://dev.mysql.com/doc/refman/4.1/en/show.html

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
 Share

×
×
  • Create New...