Skip to content

API: Database::apply()

Francesco Bianco edited this page Aug 3, 2017 · 1 revision

Method: Javanile\Moldable\Database::apply( array $schema ) : array

Description

$db->apply([
  'table1' => [ 'field1' => 'notation', 'field2' => 'notation', ...],
  'table2' => [ 'field1' => 'notation', 'field2' => 'notation', ...],
  ...
]);

Parameters

  • Table_1 . . . Table_N: Tables name
  • Field_1 . . . Field_N: Fields name
  • Notation: a constat value like 0, 1, '', or extended notation

Return value

  • array with sql queries sended to database or
  • false if no database tables are updated

See also

Example 1 - Create database from JSON file

$db->apply(array(

));

Example 2 - Create database from INI file

$db->apply(array(

));

Example 3 - Create database from XML file

$db->apply(array(

));

Clone this wiki locally