Re: binding values to sql statement in DBI perl

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: binding values to sql statement in DBI perl
Дата
Msg-id 20050407002854.GA57640@winnie.fuhr.org
обсуждение исходный текст
Ответ на binding values to sql statement in DBI perl  (Deepblues <deepblues@gmail.com>)
Ответы Re: binding values to sql statement in DBI perl  (Deepblues <deepblues@gmail.com>)
Список pgsql-novice
On Wed, Apr 06, 2005 at 11:42:55AM -0500, Deepblues wrote:
>
> I am having trouble with binding values to SQL statements using dbi perl.
>
> The scenerio is as follows :
>
> I have a scheduling database that holds the listings of classes and
> there schedules for a university. I am trying to query the database to
> display the listings of classes , sections for  a particular semester
> that the user enters.
> I am able to get the results with the actual value but then when I use
> the variable which holds the values of the semester the user entered
> and try querying , it displays an error message saying
>
> "unbound place holder "

Could you post a small but complete program that exhibits the
problem?  Without seeing your code we can only guess what might be
wrong.  Also, please post the complete, exact text of the error
message (copied and pasted, not typed manually).

I suspect the real error is something like the following:

DBD::Pg::st execute failed: execute called with an unbound placeholder at ./foo line 14.

If that's the case, then you might have called $sth->execute() with
no arguments when you should have called it with arguments, e.g.,
$sth->execute($variable).  But that's just a guess; without seeing
your code we can't be sure.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Keith Worthington"
Дата:
Сообщение: JOIN on a lookup table
Следующее
От: Keith Worthington
Дата:
Сообщение: Re: JOIN on a lookup table