Hi,
First of all, My Settings:
- Midgard 1.8.0
- SuSe 9.3
- PHP 4.3.10
The situation: I want to use querybuilder to fetch some articles, then
collect certain parameters from each article.
In my test-scenario every article under $a_topic_id does have several
parameters.
I can fetch the articles, but not the parameters...
Now here is the code (stripped to the necessary parts):
---- snip ---
$qb_question=new midgard_query_builder('midgard_article');
$qb_question->add_constraint('topic','=', intval($a_topic_id));
$qb_question_result = $qb_question->execute();
foreach($qb_question_result as $all_questions)
{
// print_r($all_questions); gives "midgard_article Object ( [guid] =>
....)",
// so an article_object exists
$params = $all_questions->listparameters();
//^^^^ line above fails with "Call to a member function on a
non-object"
if($params->N > 0)
{
while($params->fetch())
{
echo $params->domain;
}
}
}
--- snap ---
As you see from comments, I cannot use $object->listparameters() on the
Object returned by QueryBuilder.
I just dont have a clue why this fails.
Can anyone comment on this? Is this maybe a known midgard-1.8.0 problem?
Thanks in advance,
Alex
_______________________________________________
user mailing list
[email protected]
http://lists.midgard-project.org/mailman/listinfo/user