Recent Posts
None | 9 sec ago
C++ | 28 sec ago
None | 36 sec ago
None | 48 sec ago
Java | 59 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Stig on the 22nd of Nov 2008 08:50:30 AM
Download |
Raw |
Embed |
Report
<?php
class myClass {
var $link, $result;
function db_connect($server, $user, $pass, $database) { // ->db_connect("localhost", "user", "pass", "db");
}
$this->error("Could not select database: " . mysql_error());
}
return true;
}
function error($error) {
$string_error = date("d/m/Y - H:i:s ") . " (" . $_SERVER['REMOTE_ADDR'] . ")\n" . $error . "\n\n";
$file = "errors.txt";
$file = fopen($file, 'a') or
die("Fejl, hændelsen kunne ikke logges!");
die("Der er opstået en uventet fejl. Hændelsen er blevet logget og Administrator vil blive informeret.");
}
function getRows() { // while($row = $con->getRows()) { echo $row['id']; }
}
function query($sql) {
}
}
function getQuery($table, $what="*", $end="") { // ->getQuery("info", "*", "ORDER BY navn ASC");
$sql = "SELECT $what FROM $table $end";
$this->query($sql);
}
function cntRows() { // echo ->cntRows();
}
function insQuery($table, $column_data) { // ->insert("info", "navn='Navn', adresse='Adresse'");
$sql = "INSERT INTO $table SET $column_data";
$this->query($sql);
}
function delQuery($table, $where, $is) { // ->delete("info", "id", "1");
$sql = "DELETE FROM $table WHERE $where = '$is'";
$this->query($sql);
}
function updQuery($table, $what, $with, $where, $is) { // ->updQuery("info", "navn", "Navn", "id", "1");
$sql = "UPDATE $table SET $what = '$with' WHERE $where = '$is'";
$this->query($sql);
}
}
?>
Submit a correction or amendment below.
Make A New Post