For me (PHP 4.3.3, Mnogo 3.2.15 on FreeBSD) Mnogo doesn't work as described - but very well if done as in the PHP-template distributed by MnogoSearch
I had huge problems getting Udm_Find(... to return anything at all.
All the other calls worked, like udm_get_doc_count(... but _find seemed to insist on returning nothing, no matter what I tried.
However, I had actually a working installation of mnogo, using the PHP template, so it was just to find the difference in the, BTW impressive, work by Sergey 'gluke' Kartashoff.
The result was surprising, see below. The parameter UDM_PARAM_QUERY is not mentioned in the manual
<?php
$q="help";
// This is the real query. Note that Udm_find seems to
// ignore it, despite the
// description in the manual
$udm_agent
=Udm_Alloc_Agent('pgsql://me:secret@/mnogo_db/?dbmode=multi');
// This is actually also contrary to the manual, but it
// works. Also in the PHP-template it said
/*
if (Udm_Api_Version() >= 30204) {
$dbaddr='mysql://mnogo:mnogo@/mnogo/?dbmode=single';
} else {
$dbaddr='mysql://mnogo:mnogo@/mnogo/';
$dbmode='single';
}
*/
// which contradicts the manual for never versions
$iDoItAsInTheManual = true; //Set to false and it works
if ($iDoItAsInTheManual)
{
$res=Udm_Find($udm_agent, $q);
}
else
// This works:
{
Udm_Set_Agent_Param($udm_agent,UDM_PARAM_QUERY,$q);
$res=Udm_Find($udm_agent,"anything here, makes no difference!!");
}
$url = udm_get_res_field(
$res, //resource res,
0, // int row,
UDM_FIELD_URL // int field
);
echo $url;
// Fails if $iDoItAsInTheManual==true, otherwise it works fine
?>
I don't know where something has gone wrong but I hope this may help someone save a little time.