XOOPS  2.6.0
Xmf\Database\TableLoad Class Reference

Static Public Member Functions

static loadTableFromArray ($table, $data)
 
static loadTableFromYamlFile ($table, $yamlFile)
 
static rowCount ($table, $criteria=null)
 
static truncateTable ($table)
 

Detailed Description

Definition at line 29 of file TableLoad.php.

Member Function Documentation

static Xmf\Database\TableLoad::loadTableFromArray (   $table,
  $data 
)
static

loadTableFromArray

Parameters
string$tablename of table to load without prefix
array$dataarray of rows to insert Each element of the outer array represents a single table row. Each row is an associative array in 'column' => 'value' format.
Returns
int number of rows inserted

Definition at line 42 of file TableLoad.php.

References $count, and Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Database\TableLoad::loadTableFromYamlFile (   $table,
  $yamlFile 
)
static

loadTableFromYamlFile

Parameters
string$tablename of table to load without prefix
string$yamlFilename of file containing data dump in YAML format
Returns
int number of rows inserted

Definition at line 62 of file TableLoad.php.

References $count, and Xoops\Core\Yaml\read().

Here is the call graph for this function:

static Xmf\Database\TableLoad::rowCount (   $table,
  $criteria = null 
)
static

rowCount - get count of rows in a table

Parameters
string$tablename of table to count
CriteriaElement$criteriaoptional criteria
Returns
int number of rows

Definition at line 98 of file TableLoad.php.

References $count, $criteria, $result, and Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Database\TableLoad::truncateTable (   $table)
static

truncateTable - empty a database table

Parameters
string$tablename of table to truncate
Returns
int number of affected rows

Definition at line 81 of file TableLoad.php.

References $platform, $sql, and Xoops\getInstance().

Here is the call graph for this function:


The documentation for this class was generated from the following file: