What about get_person_by_name($name) ?

TH

ons, 2003-02-26 kl. 10:12 skrev pp:
> Sergei Dolmatov <[EMAIL PROTECTED]> wrote:
> 
> > >   $user = mgd_get_person( "1000");
> > > 
> > > it returns NULL because it is trying to find the user number 1000 in the 
> > > database, rather than the user NAMED 1000.
> > > 
> > > How can I get around this problem?
> > 
> > Unfortunately, current mgd_get_person() implementation contains both id
> > and name check. So when argument to this function contains only digits, it
> > assumes that it is id (doesn't rely on type of argument).
> > 
> > So I don't know how you could work around this problem without rewriting
> > this function in midgard-php or fixing your person names - just add any
> > letter in name.
> 
> I am not sure if that could help cause PHP itself will treat '1000a' as '1000'.
> (Maybe settype?) 
> The only solution is get person by its ID.
> Why that can not be used? 
> 
> 
> Piotras
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Tarjei Huse <[EMAIL PROTECTED]>
NU


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to