XOOPS  2.6.0
database.php
Go to the documentation of this file.
1 <?php
28 abstract class XoopsDatabase
29 {
35  public $conn;
36 
42  public $prefix = '';
43 
49  public $allowWebChanges = false;
50 
51 
60  public function setPrefix($value)
61  {
62  $this->prefix = $value;
63  }
64 
76  public function prefix($tablename = '')
77  {
78 
79  if ($tablename != '') {
80  return $this->prefix . '_' . $tablename;
81  } else {
82  return $this->prefix;
83  }
84  }
85 
96  abstract public function connect($selectdb = true);
97 
110  abstract public function genId($sequence);
111 
121  abstract public function fetchRow($result);
122 
132  abstract public function fetchArray($result);
133 
143  abstract public function fetchBoth($result);
144 
154  abstract public function fetchObject($result);
155 
163  abstract public function getInsertId();
164 
174  abstract public function getRowsNum($result);
175 
183  abstract public function getAffectedRows();
184 
192  abstract public function close();
193 
203  abstract public function freeRecordSet($result);
204 
213  abstract public function error();
214 
224  abstract public function errno();
225 
236  abstract public function quoteString($str);
237 
247  abstract public function quote($string);
248 
258  abstract public function escape($string);
259 
272  abstract public function queryF($sql, $limit = 0, $start = 0);
273 
288  abstract public function query($sql, $limit = 0, $start = 0);
289 
300  abstract public function queryFromFile($file);
301 
312  abstract public function getFieldName($result, $offset);
313 
324  abstract public function getFieldType($result, $offset);
325 
335  abstract public function getFieldsNum($result);
336 }
fetchBoth($result)
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
Definition: browse.php:55
getFieldsNum($result)
quote($string)
$result
Definition: pda.php:33
fetchObject($result)
genId($sequence)
quoteString($str)
fetchArray($result)
fetchRow($result)
queryF($sql, $limit=0, $start=0)
getRowsNum($result)
query($sql, $limit=0, $start=0)
prefix($tablename= '')
Definition: database.php:76
setPrefix($value)
Definition: database.php:60
getFieldName($result, $offset)
getFieldType($result, $offset)
$sql
Definition: pda.php:32
connect($selectdb=true)
escape($string)
$limit
Definition: findusers.php:202
freeRecordSet($result)
$start
queryFromFile($file)