database Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 database ($host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true)
 database ($host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true)
 database ($host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true)
 debug ($level)
 debug ($level)
 debug ($level)
 explain ()
 explain ()
 explain ()
 GenID ($foo1=null, $foo2=null)
 GenID ($foo1=null, $foo2=null)
 GenID ($foo1=null, $foo2=null)
 getAffectedRows ()
 getAffectedRows ()
 getAffectedRows ()
 getErrorMsg ()
 getErrorMsg ()
 getErrorMsg ()
 getErrorNum ()
 getErrorNum ()
 getErrorNum ()
 getEscaped ($text, $extra=false)
 getEscaped ($text, $extra=false)
 getEscaped ($text, $extra=false)
 getNullDate ()
 getNullDate ()
 getNullDate ()
 getNumRows ($cur=null)
 getNumRows ($cur=null)
 getNumRows ($cur=null)
 getPrefix ()
 getPrefix ()
 getPrefix ()
 getQuery ()
 getQuery ()
 getQuery ()
 getTableCreate ($tables)
 getTableCreate ($tables)
 getTableCreate ($tables)
 getTableFields ($tables)
 getTableFields ($tables)
 getTableFields ($tables)
 getTableList ()
 getTableList ()
 getTableList ()
 getVersion ()
 getVersion ()
 getVersion ()
 insertid ()
 insertid ()
 insertid ()
 insertObject ($table, &$object, $keyName=NULL, $verbose=false)
 insertObject ($table, &$object, $keyName=NULL, $verbose=false)
 insertObject ($table, &$object, $keyName=NULL, $verbose=false)
 loadAssocList ($key='')
 loadAssocList ($key='')
 loadAssocList ($key='')
 loadObject (&$object)
 loadObject (&$object)
 loadObject (&$object)
 loadObjectList ($key='')
 loadObjectList ($key='')
 loadObjectList ($key='')
 loadResult ()
 loadResult ()
 loadResult ()
 loadResultArray ($numinarray=0)
 loadResultArray ($numinarray=0)
 loadResultArray ($numinarray=0)
 loadRow ()
 loadRow ()
 loadRow ()
 loadRowList ($key=null)
 loadRowList ($key='')
 loadRowList ($key='')
 NameQuote ($s)
 NameQuote ($s)
 NameQuote ($s)
 query ()
 query ()
 query ()
 query_batch ($abort_on_error=true, $p_transaction_safe=false)
 query_batch ($abort_on_error=true, $p_transaction_safe=false)
 query_batch ($abort_on_error=true, $p_transaction_safe=false)
 Quote ($text, $escaped=true)
 Quote ($text, $escaped=true)
 Quote ($text, $escaped=true)
 replacePrefix ($sql, $prefix='#__')
 replacePrefix ($sql, $prefix='#__')
 replacePrefix ($sql, $prefix='#__')
 setQuery ($sql, $offset=0, $limit=0, $prefix='#__')
 setQuery ($sql, $offset=0, $limit=0, $prefix='#__')
 setQuery ($sql, $offset=0, $limit=0, $prefix='#__')
 stderr ($showSQL=false)
 stderr ($showSQL=false)
 stderr ($showSQL=false)
 updateObject ($table, &$object, $keyName, $updateNulls=true)
 updateObject ($table, &$object, $keyName, $updateNulls=true)
 updateObject ($table, &$object, $keyName, $updateNulls=true)

Öffentliche Attribute

 $_cursor = null
 $_debug = 0
 $_errorMsg = ''
 $_errorNum = 0
 $_limit = 0
 $_log = null
 $_nameQuote = '`'
 $_nullDate = '0000-00-00 00:00:00'
 $_offset = 0
 $_resource = ''
 $_sql = ''
 $_table_prefix = ''
 $_ticker = 0

Private Methoden

 _quoteField ($value, $type)


Ausführliche Beschreibung

Definiert in Zeile 23 der Datei database.mysql5.php.


Dokumentation der Elementfunktionen

database::_quoteField ( value,
type 
) [private]

Quote based on field type

Parameter:
mixed The value of the field
string The field type
Rückgabe:
string The correct field format

Definiert in Zeile 164 der Datei database.mysql5.php.

Benutzt $type.

00164                                               {
00165                 switch ($type) {
00166                         case 'text':
00167                         case 'mediumtext':
00168                         case 'varchar':
00169                                 $result = $this->Quote( $value );
00170                                 break;
00171 
00172                         case 'date':
00173                         case 'datetime':
00174                                 if (empty( $value )) {
00175                                         $value = $this->_nullDate;
00176                                 }
00177                                 $result = $this->Quote( $value );
00178                                 break;
00179 
00180                         case 'float':
00181                         case 'double':
00182                                 $result = (double) $value;
00183                                 break;
00184 
00185                         case 'int':
00186                         case 'tinyint':
00187                         case 'tinyint unsigned':
00188                         case 'int unsigned':
00189                         case 'unsigned':
00190                         default:
00191                                 $result = (int) $value;
00192                                 break;
00193                 }
00194                 return $result;
00195         }

database::database ( host = 'localhost',
user,
pass,
db = '',
table_prefix = '',
goOffline = true 
)

Database object constructor

Parameter:
string Database host
string Database user name
string Database user password
string Database name
string Common prefix for all tables
boolean If true and there is an error, go offline

Definiert in Zeile 60 der Datei database.php.

Benutzt $basePath und $pass.

00060                                                                                                         {
00061                 // perform a number of fatality checks, then die gracefully
00062                 if (!function_exists( 'mysql_connect' )) {
00063                         $mosSystemError = 1;
00064                         if ($goOffline) {
00065                                 $basePath = dirname( __FILE__ );
00066                                 include $basePath . '/../configuration.php';
00067                                 include $basePath . '/../offline.php';
00068                                 exit();
00069                         }
00070                 }
00071                 if (phpversion() < '4.2.0') {
00072                         if (!($this->_resource = @mysql_connect( $host, $user, $pass ))) {
00073                                 $mosSystemError = 2;
00074                                 if ($goOffline) {
00075                                         $basePath = dirname( __FILE__ );
00076                                         include $basePath . '/../configuration.php';
00077                                         include $basePath . '/../offline.php';
00078                                         exit();
00079                                 }
00080                         }
00081                 } else {
00082                         if (!($this->_resource = @mysql_connect( $host, $user, $pass, true ))) {
00083                                 $mosSystemError = 2;
00084                                 if ($goOffline) {
00085                                         $basePath = dirname( __FILE__ );
00086                                         include $basePath . '/../configuration.php';
00087                                         include $basePath . '/../offline.php';
00088                                         exit();
00089                                 }
00090                         }
00091                 }
00092                 if ($db != '' && !mysql_select_db( $db, $this->_resource )) {
00093                         $mosSystemError = 3;
00094                         if ($goOffline) {
00095                                 $basePath = dirname( __FILE__ );
00096                                 include $basePath . '/../configuration.php';
00097                                 include $basePath . '/../offline.php';
00098                                 exit();
00099                         }
00100                 }
00101                 $this->_table_prefix = $table_prefix;
00102         //@mysql_query("SET NAMES 'utf8'", $this->_resource);
00103                 $this->_ticker = 0;
00104                 $this->_log = array();
00105         }

database::database ( host = 'localhost',
user,
pass,
db = '',
table_prefix = '',
goOffline = true 
)

Database object constructor

Parameter:
string Database host
string Database user name
string Database user password
string Database name
string Common prefix for all tables
boolean If true and there is an error, go offline

Definiert in Zeile 60 der Datei database.mysqli.php.

Benutzt $basePath und $pass.

00060                                                                                                         {
00061                 // perform a number of fatality checks, then die gracefully
00062                 if (!function_exists( 'mysqli_connect' )) {
00063                         $mosSystemError = 1;
00064                         if ($goOffline) {
00065                                 $basePath = dirname( __FILE__ );
00066                                 include $basePath . '/../configuration.php';
00067                                 include $basePath . '/../offline.php';
00068                                 exit();
00069                         }
00070                 }
00071                 if (!($this->_resource = @mysqli_connect( $host, $user, $pass ))) {
00072                         $mosSystemError = 2;
00073                         if ($goOffline) {
00074                                 $basePath = dirname( __FILE__ );
00075                                 include $basePath . '/../configuration.php';
00076                                 include $basePath . '/../offline.php';
00077                                 exit();
00078                         }
00079                 }
00080                 if ($db != '' && !mysqli_select_db($this->_resource, $db)) {
00081                         $mosSystemError = 3;
00082                         if ($goOffline) {
00083                                 $basePath = dirname( __FILE__ );
00084                                 include $basePath . '/../configuration.php';
00085                                 include $basePath . '/../offline.php';
00086                                 exit();
00087                         }
00088                 }
00089                 $this->_table_prefix = $table_prefix;
00090                 $this->_ticker = 0;
00091                 $this->_log = array();
00092         }

database::database ( host = 'localhost',
user,
pass,
db = '',
table_prefix = '',
goOffline = true 
)

Database object constructor

Parameter:
string Database host
string Database user name
string Database user password
string Database name
string Common prefix for all tables
boolean If true and there is an error, go offline

Definiert in Zeile 60 der Datei database.mysql5.php.

Benutzt $basePath und $pass.

00060                                                                                                         {
00061                 // perform a number of fatality checks, then die gracefully
00062                 if (!function_exists( 'mysqli_connect' )) {
00063                         $mosSystemError = 1;
00064                         if ($goOffline) {
00065                                 $basePath = dirname( __FILE__ );
00066                                 include $basePath . '/../configuration.php';
00067                                 include $basePath . '/../offline.php';
00068                                 exit();
00069                         }
00070                 }
00071                 if (!($this->_resource = @mysqli_connect( $host, $user, $pass ))) {
00072                         $mosSystemError = 2;
00073                         if ($goOffline) {
00074                                 $basePath = dirname( __FILE__ );
00075                                 include $basePath . '/../configuration.php';
00076                                 include $basePath . '/../offline.php';
00077                                 exit();
00078                         }
00079                 }
00080                 if ($db != '' && !mysqli_select_db($this->_resource, $db)) {
00081                         $mosSystemError = 3;
00082                         if ($goOffline) {
00083                                 $basePath = dirname( __FILE__ );
00084                                 include $basePath . '/../configuration.php';
00085                                 include $basePath . '/../offline.php';
00086                                 exit();
00087                         }
00088                 }
00089                 $this->_table_prefix = $table_prefix;
00090                 $this->_ticker = 0;
00091                 $this->_log = array();
00092 
00093                 $this->setSQLMode();
00094         }

database::debug ( level  ) 

Parameter:
int 

Definiert in Zeile 109 der Datei database.php.

00109                                  {
00110                 $this->_debug = intval( $level );
00111         }

database::debug ( level  ) 

Parameter:
int 

Definiert in Zeile 96 der Datei database.mysqli.php.

00096                                  {
00097                 $this->_debug = intval( $level );
00098         }

database::debug ( level  ) 

Parameter:
int 

Definiert in Zeile 98 der Datei database.mysql5.php.

00098                                  {
00099                 $this->_debug = intval( $level );
00100         }

database::explain (  ) 

Diagnostic function

Definiert in Zeile 365 der Datei database.php.

Benutzt $k und $row.

00365                            {
00366                 $temp = $this->_sql;
00367                 $this->_sql = "EXPLAIN $this->_sql";
00368                 $this->query();
00369 
00370                 if (!($cur = $this->query())) {
00371                         return null;
00372                 }
00373                 $first = true;
00374 
00375                 $buf = "<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" bgcolor=\"#000000\" align=\"center\">";
00376                 $buf .= $this->getQuery();
00377                 while ($row = mysql_fetch_assoc( $cur )) {
00378                         if ($first) {
00379                                 $buf .= "<tr>";
00380                                 foreach ($row as $k=>$v) {
00381                                         $buf .= "<th bgcolor=\"#ffffff\">$k</th>";
00382                                 }
00383                                 $buf .= "</tr>";
00384                                 $first = false;
00385                         }
00386                         $buf .= "<tr>";
00387                         foreach ($row as $k=>$v) {
00388                                 $buf .= "<td bgcolor=\"#ffffff\">$v</td>";
00389                         }
00390                         $buf .= "</tr>";
00391                 }
00392                 $buf .= "</table><br />&nbsp;";
00393                 mysql_free_result( $cur );
00394 
00395                 $this->_sql = $temp;
00396 
00397                 return "<div style=\"background-color:#FFFFCC\" align=\"left\">$buf</div>";
00398         }

database::explain (  ) 

Diagnostic function

Definiert in Zeile 344 der Datei database.mysqli.php.

Benutzt $k und $row.

00344                            {
00345                 $temp = $this->_sql;
00346                 $this->_sql = "EXPLAIN $this->_sql";
00347                 $this->query();
00348 
00349                 if (!($cur = $this->query())) {
00350                         return null;
00351                 }
00352                 $first = true;
00353 
00354                 $buf = "<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" bgcolor=\"#000000\" align=\"center\">";
00355                 $buf .= $this->getQuery();
00356                 while ($row = mysqli_fetch_assoc( $cur )) {
00357                         if ($first) {
00358                                 $buf .= "<tr>";
00359                                 foreach ($row as $k=>$v) {
00360                                         $buf .= "<th bgcolor=\"#ffffff\">$k</th>";
00361                                 }
00362                                 $buf .= "</tr>";
00363                                 $first = false;
00364                         }
00365                         $buf .= "<tr>";
00366                         foreach ($row as $k=>$v) {
00367                                 $buf .= "<td bgcolor=\"#ffffff\">$v</td>";
00368                         }
00369                         $buf .= "</tr>";
00370                 }
00371                 $buf .= "</table><br />&nbsp;";
00372                 mysqli_free_result( $cur );
00373 
00374                 $this->_sql = $temp;
00375 
00376                 return "<div style=\"background-color:#FFFFCC\" align=\"left\">$buf</div>";
00377         }

database::explain (  ) 

Diagnostic function

Definiert in Zeile 385 der Datei database.mysql5.php.

Benutzt $k und $row.

00385                            {
00386                 $temp = $this->_sql;
00387                 $this->_sql = "EXPLAIN $this->_sql";
00388                 $this->query();
00389 
00390                 if (!($cur = $this->query())) {
00391                         return null;
00392                 }
00393                 $first = true;
00394 
00395                 $buf = "<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" bgcolor=\"#000000\" align=\"center\">";
00396                 $buf .= $this->getQuery();
00397                 while ($row = mysqli_fetch_assoc( $cur )) {
00398                         if ($first) {
00399                                 $buf .= "<tr>";
00400                                 foreach ($row as $k=>$v) {
00401                                         $buf .= "<th bgcolor=\"#ffffff\">$k</th>";
00402                                 }
00403                                 $buf .= "</tr>";
00404                                 $first = false;
00405                         }
00406                         $buf .= "<tr>";
00407                         foreach ($row as $k=>$v) {
00408                                 $buf .= "<td bgcolor=\"#ffffff\">$v</td>";
00409                         }
00410                         $buf .= "</tr>";
00411                 }
00412                 $buf .= "</table><br />&nbsp;";
00413                 mysqli_free_result( $cur );
00414 
00415                 $this->_sql = $temp;
00416 
00417                 return "<div style=\"background-color:#FFFFCC\" align=\"left\">$buf</div>";
00418         }

database::GenID ( foo1 = null,
foo2 = null 
)

Fudge method for ADOdb compatibility

Definiert in Zeile 679 der Datei database.php.

00679                                                  {
00680                 return '0';
00681         }

database::GenID ( foo1 = null,
foo2 = null 
)

Fudge method for ADOdb compatibility

Definiert in Zeile 658 der Datei database.mysqli.php.

00658                                                  {
00659                 return '0';
00660         }

database::GenID ( foo1 = null,
foo2 = null 
)

Fudge method for ADOdb compatibility

Definiert in Zeile 699 der Datei database.mysql5.php.

00699                                                  {
00700                 return '0';
00701         }

database::getAffectedRows (  ) 

Rückgabe:
int The number of affected rows in the previous operation

Definiert in Zeile 325 der Datei database.php.

00325                                    {
00326                 return mysql_affected_rows( $this->_resource );
00327         }

database::getAffectedRows (  ) 

Rückgabe:
int The number of affected rows in the previous operation

Definiert in Zeile 304 der Datei database.mysqli.php.

00304                                    {
00305                 return mysqli_affected_rows( $this->_resource );
00306         }

database::getAffectedRows (  ) 

Rückgabe:
int The number of affected rows in the previous operation

Definiert in Zeile 345 der Datei database.mysql5.php.

00345                                    {
00346                 return mysqli_affected_rows( $this->_resource );
00347         }

database::getErrorMsg (  ) 

Rückgabe:
string The error message for the most recent query

Definiert in Zeile 121 der Datei database.php.

00121                                {
00122                 return str_replace( array( "\n", "'" ), array( '\n', "\'" ), $this->_errorMsg );
00123         }

database::getErrorMsg (  ) 

Rückgabe:
string The error message for the most recent query

Definiert in Zeile 108 der Datei database.mysqli.php.

00108                                {
00109                 return str_replace( array( "\n", "'" ), array( '\n', "\'" ), $this->_errorMsg );
00110         }

database::getErrorMsg (  ) 

Rückgabe:
string The error message for the most recent query

Definiert in Zeile 110 der Datei database.mysql5.php.

00110                                {
00111                 return str_replace( array( "\n", "'" ), array( '\n', "\'" ), $this->_errorMsg );
00112         }

database::getErrorNum (  ) 

Rückgabe:
int The error number for the most recent query

Definiert in Zeile 115 der Datei database.php.

00115                                {
00116                 return $this->_errorNum;
00117         }

database::getErrorNum (  ) 

Rückgabe:
int The error number for the most recent query

Definiert in Zeile 102 der Datei database.mysqli.php.

00102                                {
00103                 return $this->_errorNum;
00104         }

database::getErrorNum (  ) 

Rückgabe:
int The error number for the most recent query

Definiert in Zeile 104 der Datei database.mysql5.php.

00104                                {
00105                 return $this->_errorNum;
00106         }

database::getEscaped ( text,
extra = false 
)

Get a database escaped string

Parameter:
string The string to be escaped
boolean Optional parameter to provide extra escaping
Rückgabe:
string public

Definiert in Zeile 134 der Datei database.php.

Benutzt $string und $text.

00134                                                      {
00135                 // Use the appropriate escape string depending upon which version of php
00136                 // you are running
00137                 if (version_compare(phpversion(), '4.3.0', '<')) {
00138                         $string = mysql_escape_string($text);
00139                 } else  {
00140                         $string = mysql_real_escape_string($text, $this->_resource);
00141                 }
00142                 if ($extra) {
00143                         $string = addcslashes( $string, '%_' );
00144                 }
00145                 return $string;
00146         }

database::getEscaped ( text,
extra = false 
)

Get a database escaped string

Parameter:
string The string to be escaped
boolean Optional parameter to provide extra escaping
Rückgabe:
string public

Definiert in Zeile 121 der Datei database.mysqli.php.

Benutzt $string und $text.

00121                                                      {
00122                 $string = mysqli_real_escape_string( $this->_resource, $text );
00123                 if ($extra) {
00124                         $string = addcslashes( $string, '%_' );
00125                 }
00126                 return $string;
00127         }

database::getEscaped ( text,
extra = false 
)

Get a database escaped string

Parameter:
string The string to be escaped
boolean Optional parameter to provide extra escaping
Rückgabe:
string public

Definiert in Zeile 123 der Datei database.mysql5.php.

Benutzt $string und $text.

00123                                                      {
00124                 $string = mysqli_real_escape_string( $this->_resource, $text );
00125                 if ($extra) {
00126                         $string = addcslashes( $string, '%_' );
00127                 }
00128                 return $string;
00129         }

database::getNullDate (  ) 

Rückgabe:
string Quoted null/zero date string

Definiert in Zeile 183 der Datei database.php.

00183                                {
00184                 return $this->_nullDate;
00185         }

database::getNullDate (  ) 

Rückgabe:
string Quoted null/zero date string

Definiert in Zeile 164 der Datei database.mysqli.php.

00164                                {
00165                 return $this->_nullDate;
00166         }

database::getNullDate (  ) 

Rückgabe:
string Quoted null/zero date string

Definiert in Zeile 205 der Datei database.mysql5.php.

00205                                {
00206                 return $this->_nullDate;
00207         }

database::getNumRows ( cur = null  ) 

Rückgabe:
int The number of rows returned from the most recent query.

Definiert in Zeile 402 der Datei database.php.

00402                                          {
00403                 return mysql_num_rows( $cur ? $cur : $this->_cursor );
00404         }

database::getNumRows ( cur = null  ) 

Rückgabe:
int The number of rows returned from the most recent query.

Definiert in Zeile 381 der Datei database.mysqli.php.

00381                                          {
00382                 return mysqli_num_rows( $cur ? $cur : $this->_cursor );
00383         }

database::getNumRows ( cur = null  ) 

Rückgabe:
int The number of rows returned from the most recent query.

Definiert in Zeile 422 der Datei database.mysql5.php.

00422                                          {
00423                 return mysqli_num_rows( $cur ? $cur : $this->_cursor );
00424         }

database::getPrefix (  ) 

Rückgabe:
string The database prefix

Definiert in Zeile 177 der Datei database.php.

00177                              {
00178                 return $this->_table_prefix;
00179         }

database::getPrefix (  ) 

Rückgabe:
string The database prefix

Definiert in Zeile 158 der Datei database.mysqli.php.

00158                              {
00159                 return $this->_table_prefix;
00160         }

database::getPrefix (  ) 

Rückgabe:
string The database prefix

Definiert in Zeile 199 der Datei database.mysql5.php.

00199                              {
00200                 return $this->_table_prefix;
00201         }

database::getQuery (  ) 

Rückgabe:
string The current value of the internal SQL vairable

Definiert in Zeile 282 der Datei database.php.

00282                             {
00283                 return "<pre>" . htmlspecialchars( $this->_sql ) . "</pre>";
00284         }

database::getQuery (  ) 

Rückgabe:
string The current value of the internal SQL vairable

Definiert in Zeile 263 der Datei database.mysqli.php.

00263                             {
00264                 return "<pre>" . htmlspecialchars( $this->_sql ) . "</pre>";
00265         }

database::getQuery (  ) 

Rückgabe:
string The current value of the internal SQL vairable

Definiert in Zeile 304 der Datei database.mysql5.php.

00304                             {
00305                 return "<pre>" . htmlspecialchars( $this->_sql ) . "</pre>";
00306         }

database::getTableCreate ( tables  ) 

Parameter:
array A list of valid (and safe!) table names
Rückgabe:
array A list the create SQL for the tables

Definiert in Zeile 645 der Datei database.php.

Benutzt $row, $rows und $tables.

00645                                            {
00646                 $result = array();
00647 
00648                 foreach ($tables as $tblval) {
00649                         $this->setQuery( 'SHOW CREATE table ' . $this->getEscaped( $tblval ) );
00650                         $rows = $this->loadRowList();
00651                         foreach ($rows as $row) {
00652                                 $result[$tblval] = $row[1];
00653                         }
00654                 }
00655 
00656                 return $result;
00657         }

database::getTableCreate ( tables  ) 

Parameter:
array A list of valid (and safe!) table names
Rückgabe:
array A list the create SQL for the tables

Definiert in Zeile 624 der Datei database.mysqli.php.

Benutzt $row, $rows und $tables.

00624                                            {
00625                 $result = array();
00626 
00627                 foreach ($tables as $tblval) {
00628                         $this->setQuery( 'SHOW CREATE table ' . $this->getEscaped( $tblval ) );
00629                         $rows = $this->loadRowList();
00630                         foreach ($rows as $row) {
00631                                 $result[$tblval] = $row[1];
00632                         }
00633                 }
00634 
00635                 return $result;
00636         }

database::getTableCreate ( tables  ) 

Parameter:
array A list of valid (and safe!) table names
Rückgabe:
array A list the create SQL for the tables

Definiert in Zeile 665 der Datei database.mysql5.php.

Benutzt $row, $rows und $tables.

00665                                            {
00666                 $result = array();
00667 
00668                 foreach ($tables as $tblval) {
00669                         $this->setQuery( 'SHOW CREATE table ' . $this->getEscaped( $tblval ) );
00670                         $rows = $this->loadRowList();
00671                         foreach ($rows as $row) {
00672                                 $result[$tblval] = $row[1];
00673                         }
00674                 }
00675 
00676                 return $result;
00677         }

database::getTableFields ( tables  ) 

Parameter:
array A list of valid (and safe!) table names
Rückgabe:
array An array of fields by table

Definiert in Zeile 662 der Datei database.php.

Benutzt $tables.

00662                                            {
00663                 $result = array();
00664 
00665                 foreach ($tables as $tblval) {
00666                         $this->setQuery( 'SHOW FIELDS FROM ' . $tblval );
00667                         $fields = $this->loadObjectList();
00668                         foreach ($fields as $field) {
00669                                 $result[$tblval][$field->Field] = preg_replace("/[(0-9)]/",'', $field->Type );
00670                         }
00671                 }
00672 
00673                 return $result;
00674         }

database::getTableFields ( tables  ) 

Parameter:
array A list of valid (and safe!) table names
Rückgabe:
array An array of fields by table

Definiert in Zeile 641 der Datei database.mysqli.php.

Benutzt $tables.

00641                                            {
00642                 $result = array();
00643 
00644                 foreach ($tables as $tblval) {
00645                         $this->setQuery( 'SHOW FIELDS FROM ' . $tblval );
00646                         $fields = $this->