Ejemplo n.º 1
0
 public function getUsersId()
 {
     $sql = "SELECT uid\n                FROM `{$this->tableName}` ";
     $result = $this->connect->queryAll($sql);
     $arrId = [];
     for ($i = 0; $i < count($result); $i++) {
         $arrId[] = $result[$i]['uid'];
     }
     return $arrId;
 }
Ejemplo n.º 2
0
 public function getByGid($gid)
 {
     $sql = "SELECT `uid` FROM `{$this->tableName}`\n                WHERE gid = :gid";
     $result = $this->connect->queryAll($sql, [':gid' => $gid]);
     $arr = [];
     for ($i = 0; $i < count($result); $i++) {
         $arr[] = $result[$i]['uid'];
     }
     return $arr;
 }
Ejemplo n.º 3
0
 /**
  * Retrieve tasks-data of project
  * Database query selects all opened records, and all columns of type timestamp output
  * formatting for JavaScript identification
  * @return array|null
  */
 public function get()
 {
     $sql = "SELECT *,\n                DATE_FORMAT( `start_date`, '%d-%m-%Y %H:%i:%s') as start_date,\n                DATE_FORMAT( `end_date`, '%d-%m-%Y %H:%i:%s') as end_date\n                FROM `{$this->tableName}` WHERE open = 1";
     return $this->connect->queryAll($sql);
 }
Ejemplo n.º 4
0
 public function get()
 {
     $sql = "SELECT uid\n                FROM `{$this->tableName}` ";
     $result = $this->connect->queryAll($sql);
     return $result;
 }