You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Alan E. Derhaag" <ad...@n2h2.com> on 2001/06/19 19:38:01 UTC

Re: Apache::AuthDBI

"Christian Heiss" <Ch...@heiss-net.de> writes:

> [1  <text/plain; iso-8859-1 (quoted-printable)>]
> Hi,
> 
> I'm using Apache::AuthDBI to verifying the users on my web site.
> 
> 
> 
> I can connect to the the protected site, but there is a output in the error log:
> 
> ----------------------------------------------------------------------------------------------------------------------------------------
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 450
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 480
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 481

[...]

> then I put it in the database with:
> ----------------------------------------------------------------------------------------------------------------------------------------
> >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> of course, before I'm using the quote funktion ($dbh->quote($userid)...)...

What database manager allows SQL without supplying the fields the
values go into?

Re: Apache::AuthDBI

Posted by will trillich <wi...@serensoft.com>.
On Tue, Jun 19, 2001 at 10:38:01AM -0700, Alan E. Derhaag wrote:
> "Christian Heiss" <Ch...@heiss-net.de> writes:
> 
> > Hi,
> > 
> > I'm using Apache::AuthDBI to verifying the users on my web site.

> > then I put it in the database with:
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> > of course, before I'm using the quote funktion ($dbh->quote($userid)...)...

maybe do this instead:

	@vars = ($alpha,$bravo,$charlie,$delta);
	my $sql = "insert into sometable values(" . (join '.',('?') x @vars) . ")";
	$sth = $dbh->prepare($sql);
	$sth->execute(@vars);
	$sth->finish();

just a suggestion...

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, "Some Came Running"

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Re: Apache::AuthDBI

Posted by Douglas Leonard <dl...@dleonard.net>.
Standard SQL allows for inserts without specifying field names.
Personally, I think that it is more readable to specify the field names
but it is quite common to not bother doing so.

-- 
<Douglas Leonard>
<dl...@dleonard.net>

On 19 Jun 2001, Alan E. Derhaag wrote:

> "Christian Heiss" <Ch...@heiss-net.de> writes:
>
> > [1  <text/plain; iso-8859-1 (quoted-printable)>]
> > Hi,
> >
> > I'm using Apache::AuthDBI to verifying the users on my web site.
> >
> >
> >
> > I can connect to the the protected site, but there is a output in the error log:
> >
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 450
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 480
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 481
>
> [...]
>
> > then I put it in the database with:
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> > of course, before I'm using the quote funktion ($dbh->quote($userid)...)...
>
> What database manager allows SQL without supplying the fields the
> values go into?
>