Elgg  Version master
Insert.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Database;
4 
8 class Insert extends QueryBuilder {
9 
17  public static function intoTable(string $table): static {
18  $connection = _elgg_services()->db->getConnection('write');
19  $qb = new static($connection);
20  $qb->insert($table);
21 
22  return $qb;
23  }
24 }
Database abstraction query builder.
static intoTable(string $table)
Returns a QueryBuilder for inserting data in a given table.
Definition: Insert.php:17
Query builder for inserting data into the database.
Definition: Insert.php:8
$table
Definition: user.php:37
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351
$qb
Definition: queue.php:12