PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mattias Sundberg  >  SunMatDB  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example-script
Class: SunMatDB
A more complex MySQL access abstraction
Author: By
Last change:
Date: 12 years ago
Size: 407 bytes
 

Contents

Class file image Download
<pre>
<?
require("DB.inc");
$db = new DB;
$db->setProperty("showErrors",true);
$db->setProperty("hostname","localhost");
$db->setProperty("username","root");
$db->connect();
$db->selectDB("kulturbanken");

if(!
$_GET) {
   
$RS = $db->execute("select * from users");
while(
$row = $RS->next())
    echo
"<a href='?object=".$RS."'>{$row->username}</a><br>";
} else {
   
$o = $_GET["object"];
   
print_r($o);
}
   
?>