Adicionando classe Cities.class.php ao projeto
This commit is contained in:
parent
f13f6211ad
commit
7ef2a1973e
1 changed files with 6 additions and 1 deletions
7
vendor/model/Companies.class.php
vendored
7
vendor/model/Companies.class.php
vendored
|
|
@ -122,7 +122,12 @@ class Companies
|
|||
}
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select * from companies '. $this->limit;
|
||||
$this->sql = 'select cp.*,
|
||||
c.name as city
|
||||
from companies cp
|
||||
left join cities c on c.city_id = cp.city_id
|
||||
where cp.company_id > 0
|
||||
'. $this->limit;
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue