CORE POS - Fannie
The CORE POS back end
Static Public Member Functions | List of all members
COREPOS\Fannie\API\data\DataLoad Class Reference

Static Public Member Functions

static loadSampleData ($sql, $table, $search_dir='')
 

Member Function Documentation

static COREPOS\Fannie\API\data\DataLoad::loadSampleData (   $sql,
  $table,
  $search_dir = '' 
)
static

Load sample data from fannie/install/sample_data

Parameters
$sql[SQLManager] database connection
$table[string] table name
$search_dir[path, optional] look in different file location for sample data files
Returns
[boolean] success

Sample data should be one of the following

  1. A file named $table.csv with each line containing a database record
  2. A file named $table.sql with each line containing a VALUES clauses (including parenthesis). The resulting query will be: INSERT INTO $table VALUES $line_from_file

Detect number of columns in table to ensure dataset is complete. If the last column is autoincrement, that value may be omitted.


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