PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Indrek Altpere   Ultimate MySQL wrapper   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file to poll tablenames and table fields from database
Class: Ultimate MySQL wrapper
MySQL database access wrapper
Author: By
Last change: better example
Date: 17 years ago
Size: 339 bytes
 

Contents

Class file image Download
<?php
require_once 'Mysql.php';
Mysql::Init('localhost', 'root', '', 'database');

function
printtablefields($tables) {
  foreach(
$tables as $table) {
   
$fields = Mysql::GetTableFields($table);
   
print_r($fields);
  }
}
$tables = Mysql::GetTables();
print_r($tables);
printtablefields($tables);
echo
Mysql::ToString();
?>