Created
September 13, 2019 19:25
-
-
Save Toxiapo/c77c2ee27664015e6f57bdc66d1b0178 to your computer and use it in GitHub Desktop.
PHP: Describe table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = "DESCRIBE tablename"; | |
$result = $db->query($query); | |
while ($row => $result->fetch_array()) { | |
echo "{$row['Field']} - {$row['Type']}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment