<?php include 'database.php'; $query = new \DBAL\SQL\Query(); $query->build()->select('*')->from($database->Models['Control']); $results = $query($database); foreach ($results as $item) { var_dump($item); }
<?php $query = new \DBAL\SQL\Query(); $query->build()->insert('table')->set('field', 'value')->set('field2', 2); echo (string) $query;
<?php include 'database.php'; $query = new \DBAL\SQL\Query(); $query->build()->models(); $tables = $query($database); foreach ($tables as $table) { var_dump($table); }
<?php $driver = new \DBAL\Driver\MySQL(); $connection = new \DBAL\Connection($driver); $query = new \DBAL\SQL\Query(); $query->Text = "SELECT * FROM table"; $results = $query->execute(); echo $query->Text;
<?php include 'database.php'; $query = new \DBAL\SQL\Query(); $query->build()->tables(); $tables = $query($database); foreach ($tables as $table) { var_dump($table); $query = new \DBAL\SQL\Query(); $query->build()->columns()->from($table); $columns = $query($database); var_dump($columns); }