| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- class Core_Database {
- var $_conn;
- var $_errors;
- function __construct($host, $user, $password, $database, $names = '', $params = array()) {
- $this->_conn = null;
- $this->_errors = array();
- $this->_database_name = $database;
- }
- public function getDatabaseName() {
- return $this->_database_name;
- }
- /**
- * Wykonuje podane zapytanie i zwraca wynik mysql_query().
- */
- function query( $query, $msg = 'Query ERROR.' ) {
- return null;
- }
- function fetch( $res ) {
- return null;
- }
- function _( $str ) {
- return $str;
- }
- function error() {
- return "#unknown";
- }
- function _set_error( $err ) {
- $this->_errors []= $err;
- }
- function get_errors() {
- return $this->_errors;
- }
- function has_errors() {
- return !empty($this->_errors);
- }
- function get_last_error() {
- return end($this->_errors);
- }
- function get_by_id( $table, $id ) {
- return null;
- }
- }
|