[ic] Inserting info un userdb

Kevin Walsh interchange-users@icdevgroup.org
Sun Jun 16 22:19:01 2002


> 
> I use mysql as my database. I am trying to insert values into userdb as
> follow:
> 
> [tag flag write]userdb[/tag]
> 
> [perl]
> $zip_no="5000";
> $junk = $Tag->data(
>                    {
>                        table => userdb,
>                        field => zip,
>                        key => $Values->{mv_username},
>                        value => $zip_no,
>                    }
>                    );
> [/perl]
> 
> But I am always getting following error message in my log:
> 
>  Safe: no access for database userdb at
> /usr/lib/interchange/Vend/Data.pm line 906.
> 
Use [perl tables="userdb"] instead of [perl] or just call the [data]
tag directly, as that's all your Perl is doing anyway.

Instead of doing that [data] call, by whatever means, why not just
use the standard [userdb save] facility?

As a side note, you should quote barewords in your Perl, such as
'userdb' and 'zip'.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/