コード例 #1
0
ファイル: GFTag.php プロジェクト: geniusfactor/fibr
 /**
  * Populates the object from passed row dataset
  * @param array $row Single row from a SQL query
  */
 public function populateFromRow($row)
 {
     $this->id = getColumnValue($row, "tagID");
     $this->name = getColumnValue($row, "tagName");
     $this->value = getColumnValue($row, "tagName");
     $this->parentID = getColumnValue($row, "tagParentID");
 }
コード例 #2
0
ファイル: global.php プロジェクト: geniusfactor/fibr
 /**
  * [getDropDownOptions description]
  * @method getDropDownOptions
  * @param  [type]             $tableName   [description]
  * @param  [type]             $valueColumn [description]
  * @param  [type]             $nameColumn  [description]
  * @param  string             $orderBy     [description]
  * @return [type]                          [description]
  */
 function getDropDownOptions($tableName, $valueColumn, $nameColumn, $orderBy = "")
 {
     $sql = "SELECT {$valueColumn} as id, {$nameColumn} as name FROM {$tableName} {$orderBy}";
     $dataset = execPDO($sql);
     $arr = array();
     foreach ($dataset as $row) {
         $obj = new \GeniusFactor\Fibr\BaseObjects\GFKeyPair();
         $obj->id = getColumnValue($row, "id");
         $obj->name = getColumnValue($row, "name");
         $obj->value = $obj->id;
         $arr[] = $obj;
     }
     return $arr;
 }
コード例 #3
0
ファイル: GFSql.php プロジェクト: geniusfactor/fibr
 /**
  * [getColumnValueAsDateTime description]
  * @method getColumnValueAsDateTime
  * @param  [type]                   $row        [description]
  * @param  [type]                   $columnName [description]
  * @param  [type]                   $debugMode  [description]
  * @return [type]                               [description]
  */
 public static function getColumnValueAsDateTime($row, $columnName, $debugMode = false)
 {
     return new \DateTime(getColumnValue($row, $columnName, $debugMode));
 }