Open Source Content Management System

MgdSchema method get

Description:

$object->get(void)

Minimum version: Midgard 1.7

Gets MgdSchema object according to properties being set.

$object = new NewMidgardArticle();  

$object->name = "index";  
$object->topic = 3;  

if ($object->get()) {
     print "Object with id $object->id exists";
}

Return false when object is not retrieved from the database and true when object is.
Follow mgd_errstr() function to get error message on failure. Read about metadata constants if you want to get property which stores parentfield value.

Designed by Nemein, hosted by Anykey