コード例 #1
0
ファイル: blog_entries.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Blog_Entries', $id);
 }
コード例 #2
0
ファイル: document.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Documents', $id);
 }
コード例 #3
0
ファイル: admin_page.php プロジェクト: highchair/hcd-trunk
 function get_parent()
 {
     return MyActiveRecord::FindById('Pages', $this->parent_page_id);
 }
コード例 #4
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('portfolioimages', $id);
 }
コード例 #5
0
ファイル: testimonials.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Testimonials', $id);
 }
コード例 #6
0
ファイル: mailblast.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById("MailBlast", $id);
 }
コード例 #7
0
ファイル: categories.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('categories', $id);
 }
コード例 #8
0
ファイル: galleries.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Galleries', $id);
 }
コード例 #9
0
ファイル: recurrence.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Recurrence', $id);
 }
コード例 #10
0
ファイル: chunks.php プロジェクト: highchair/hcd-trunk
 function FindById($id = "")
 {
     // Double check the id to see if it is numeric? Does MyActiveRecord already do that?
     return MyActiveRecord::FindById('Chunks', $id);
 }
コード例 #11
0
ファイル: product.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Product', $id);
 }
コード例 #12
0
ファイル: photos.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Photos', $id);
 }
コード例 #13
0
ファイル: blogs.php プロジェクト: highchair/hcd-trunk
 function FindById($id = 1)
 {
     return MyActiveRecord::FindById('Blogs', $id);
 }
コード例 #14
0
ファイル: nllists.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('NLLists', $id);
 }
コード例 #15
0
ファイル: eventperiod.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('EventPeriods', $id);
 }
コード例 #16
0
ファイル: eventtype.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('EventTypes', $id);
 }
コード例 #17
0
 /**
  * returns 'parent' object.
  * e.g.
  * <code>
  * $topic = $post->find_parent('Topic');
  * </code>
  *
  * In order for the above to work, you would need to have an integer
  * field called 'Topic_id' in your 'Post' table. MyActiveRecord will take
  * care of the rest.
  *
  * @param string  strClass  Name of the class of objects to return in the array
  * @param string  strForeignKey Optional specification of foreign key at runtime
  * @return  object  object of class strClass
  */
 public function find_parent($strClass, $strForeignKey = NULL)
 {
     $key = $strForeignKey or $key = strtolower($strClass . '_id');
     return MyActiveRecord::FindById($strClass, $this->{$key});
 }
コード例 #18
0
ファイル: item.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     $itemid = mysql_real_escape_string($id, MyActiveRecord::Connection());
     return MyActiveRecord::FindById('Items', $itemid);
 }
コード例 #19
0
ファイル: paypal_config.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Paypal_Config', $id);
 }
コード例 #20
0
ファイル: user.php プロジェクト: highchair/hcd-trunk
 function FindById($id)
 {
     return MyActiveRecord::FindById('Users', $id);
 }
コード例 #21
0
ファイル: model.endo.php プロジェクト: nemoDreamer/endo
 static function FindById($strClass, $mxdID, $extend = FALSE, $cache_reset = false)
 {
     if (!AppModel::_smartLoadModel($strClass)) {
         return false;
     }
     if ($cache_reset) {
         $cache_reset = rand();
         $objects = array(array_shift(AppModel::FindAll($strClass, true, array('id' => $mxdID, "'{$cache_reset}'" => $cache_reset), 'id', 1)));
     } else {
         $objects = array(parent::FindById($strClass, $mxdID));
     }
     if ($extend) {
         AppModel::AddAllRelated($objects);
     }
     return $objects[0];
 }