[prev in list] [next in list] [prev in thread] [next in thread] 

List:       midgard-dev
Subject:    [midgard-dev] [midgard] mgd_get_xxx_by_name functions in core libraries
From:       Alexander Bokovoy <bokovoy () bspu ! unibel ! by>
Date:       1999-12-24 11:59:23
[Download RAW message or body]

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 -->

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic