Reorder and new queries, also change to Query/Builder
This commit is contained in:
22
src/Implement/Database/Query/hasTable.php
Normal file
22
src/Implement/Database/Query/hasTable.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace ProVM\Implement\Database\Query;
|
||||
|
||||
trait hasTable
|
||||
{
|
||||
protected string $table;
|
||||
|
||||
public function getTable(): string
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
public function setTable(string $table, ?string $alias = null)
|
||||
{
|
||||
$table = "`{$table}`";
|
||||
if ($alias !== null) {
|
||||
$table = "{$table} '{$alias}'";
|
||||
}
|
||||
$this->table = $table;
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user