Hello all!

Inspired by David's tips and tricks, I created two functions for
accessing topics and articles by name but implement them at the
midgard-lib and midgard-php level.

mgd_get_topic_by_name(int id, string name) returns topic by its name and
asks for an ID of supertopic, i.e. value of 'up' field in topic.

mgd_get_article_by_name(int id, string name) returns article by its name
and asks for an ID of topics which this article belongs to (i.e. value
of 'topic' field of article).

These functions are more efficient than David's functions because they,
in fact, are using just one SQL query instead of loops.

mgd_get_xxx_by_name() functions have no side effects, all other
functions works as before.
I'll put these functions into repositary under midgard/proposals/
tomorrow.

I think that this functionality should be included into 1.2.6 release.
If other Midgard developers agree with this, I'll create another level
of 'named' equalents for list_xxx and update_xxx functions.
-- 
Sincerely yours, 
Alexander Bokovoy 
<!-- 2:450/144.58 --- bokovoyATminsk.lug.net --- FractalsAtTheEdge -->

--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to