|
|
« the very existence of the bicycle is an offense to reason and wisdom. » (p.j. o'rourke)
|
|
|
|
|
| |
class database connection
 with this class it is possible to use one central database connection for all your php applications. that means you only have to define your database-access-data once for all applications. it makes your applications portable and very easy tu adjust in case of database changes! one stept forward in separating logic from db-layer.
i have used this class for all appz of swissroute.com and voegeli.li.
// Include class definition
include_once("class.database.php");
// Create Instance of Database class
$database = new Database();
// Define SQL Statement
$sql_query = "SELECT * FROM something;";
// Use Method->Query() to execute query
$database->Query($sql_query);
// "$result" contains the normal mysql-result-object
$result = $database->result;
|
|
| |
|
|
|