Alan Knowles wrote:
> this one is also a little strange ...
>
> if ( mgd_delete_sitegroup($id) ) {$messagebox = "BE HAPPY" }
> else {
> $error=mgd_errstr(mgd_errno);
> $tmpsg = mgd_get_sitegroup($id);
> $tmpmessage = $tmpsg->name . " -- " . $tmpsg->admingroup . " -- ";
> $messagebox = $messagebox . "can't delete company -- " .
>$tmpmessage."--".$error;
> }
>
> you should get message box:
>
> now since mgd_errstr = "MGD_ERR_OK" - this means that no error occured..
> however mgd_delete_sitegroup returned false - indicating failure??
Odd.. This Should Not Happen(tm). There's no straight return in
delete_sitegroup, all set a reason. Possible failure reasons could be:
1. access denied (if your're not root)
2. dependancies
3. not connected (rare, and you wouldn't see any database-served pages if
this occurred)
4. invalid object (only for object methods, not used in above sample)
So it must be one or two... but with the errno being reset. And
delete_sitegroup is a very simple function, but I'm still looking.
Emile
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]