Example #1
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Blog_Entries', $id);
 }
Example #2
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Documents', $id);
 }
Example #3
0
 function get_parent()
 {
     return MyActiveRecord::FindById('Pages', $this->parent_page_id);
 }
Example #4
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('portfolioimages', $id);
 }
Example #5
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Testimonials', $id);
 }
Example #6
0
 function FindById($id)
 {
     return MyActiveRecord::FindById("MailBlast", $id);
 }
Example #7
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('categories', $id);
 }
Example #8
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Galleries', $id);
 }
Example #9
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Recurrence', $id);
 }
Example #10
0
 function FindById($id = "")
 {
     // Double check the id to see if it is numeric? Does MyActiveRecord already do that?
     return MyActiveRecord::FindById('Chunks', $id);
 }
Example #11
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Product', $id);
 }
Example #12
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Photos', $id);
 }
Example #13
0
 function FindById($id = 1)
 {
     return MyActiveRecord::FindById('Blogs', $id);
 }
Example #14
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('NLLists', $id);
 }
Example #15
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('EventPeriods', $id);
 }
Example #16
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('EventTypes', $id);
 }
 /**
  * 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});
 }
Example #18
0
 function FindById($id)
 {
     $itemid = mysql_real_escape_string($id, MyActiveRecord::Connection());
     return MyActiveRecord::FindById('Items', $itemid);
 }
Example #19
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Paypal_Config', $id);
 }
Example #20
0
 function FindById($id)
 {
     return MyActiveRecord::FindById('Users', $id);
 }
Example #21
0
 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];
 }