If I know bind_param is a method of dbi, how do I get the docs from the
command line?
E.q., perldoc DBI::bind_param ---> it doesn't work.

How do you get the quick docs from one of the CGI's functions by
"perldoc"?
E.q., perldoc CGI::param  --> it does not work.

I'd like to know the easy way to get some specific docs from the perldoc
command instead of going through the existing AS' html on-line or CPAN
public site.
George

-----Original Message-----
From: Tim Bunce [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 10:53 AM
To: David N Murray
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Question about bind_param and Oracle


On Fri, Jul 16, 2004 at 11:57:05AM -0400, David N Murray wrote:
> You can't use a parameter for the table name.  You have to use dynamic
sql
> (i.e. put it in the $sql var before the prepare).  There's no point in
the
> prepare if the DB can't even figure out what table is going to be hit.
> 
> This should be a FAQ, but I didn't see it in there.

It's in the DBI docs.

Tim.

> hth,
> dave
> 
> On Jul 16, [EMAIL PROTECTED] scribed:
> 
> > Hi all,
> >
> > Hoping someone can help me out here.
> >
> > I'm trying to do the following using Oracle 9i and DBI:
> >
> > $table_name = "USERS";
> >
> > $sql = "SELECT COUNT(*) FROM ?";
> >
> > $sth = $dbh->prepare($sql);
> >
> > $sth->bind_param(1,$table_name);
> >
> > $sth->execute;
> > .
> > .
> > .
> > However, I'm getting an error about an invalid table name (I have
verified
> > that the table is valid and that I spelled it correctly).
> >
> > Is this even possible with Oracle and DBI?
> >
> > Please let me know.
> >
> > Thanks.
> >
> > Aaron Salvo

Reply via email to