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