QB get_guid
Posted on 2005-11-25 15:55:09 EET.
Just implemented for MidgardQueryBuilder.
$qb->get_guid(void);
Nice method which returns only object's guids as an array ( on PHP level ) instead of full objects. With faster query and faster value "allocator".
$qb = new MidgardQueryBuilder("midgard_article");
$qb->add_constraint("topic", ">", 0);
$qb->add_constraint("name", "=", index);
$qb->get_guid();
And query:
SELECT article.guid FROM article_i,article WHERE (article.topic > 0 AND article.name = 'index') AND article.id=article_i.sid AND article_i.lang IN (0, 0)
Intersting and good thing is that this method if fully metadata, sitegroup and multilang aware. In near future ACL will be added to "aware" list :)