ADOdb: How to show fields



Now, I will show you simple code that can show all fields in a table and their meta data. Just using MetaColumns().
<?php 
    include('adodb/adodb.inc.php'); 
    $db = ADONewConnection('mysql'); 
    $db->debug = true; 
    $db->Connect('localhost', 'root', 'admin', 'scanner'); 
	$arr = $db->MetaColumns('name_table'); 
	echo "<pre>";
	print_r($arr);
	echo "</pre>";
?>


Series this article:
ADOdb: Introduction
ADOdb: Connection Statement
ADOdb: Advance Select Statement
ADOdb: How to show tables
ADOdb: How to show fields
ADOdb: How to show databases
ADOdb: Caching of Recordset
ADOdb: Recordset to HTML
ADOdb: Multi Database Connection
ADOdb: Data Dictionary
ADOdb: Quick Export Data
ADOdb: Insert data style
ADOdb: Replace Data
ADOdb: Log Query
PHP ADOdb: Understanding Pivot Table For Reporting
PHP ADOdb: Creating Pivot Table
PHP ADOdb: Creating Query to Build Pivot Table


Tag: adodb, database, database layer Category: PHP Database Post : October 30th 2007 Read: 5,734 Bookmark and Share

blog comments powered by Disqus