Gossamer Forum
Home : Products : DBMan SQL : Discussion :

$GT::SQL::error;

Quote Reply
$GT::SQL::error;
Where can I find $GT::SQL::error; or the code that generates it?

In the following code -

my $error = $GT::SQL::error;

$error is assigned the value of $GT::SQL::error but I cant't find it anywhere.

Is it a sub? What is it? Where (exactly) can I find it or where it is generated????

Thanks.

Simon.
Quote Reply
Re: [jai] $GT::SQL::error; In reply to
Hi,

You will find all the error messages at the top of GT/SQL.pm

TheStone.

B.
Quote Reply
Re: [TheStone] $GT::SQL::error; In reply to
Thanks for your reply.

With my limited perl knowledge I'm trying to understand a bit better how DBManSQL works and would appreciate more detailed help.

What I don't understand is that the following (from Home.pm) calls $GT::SQL::error

else {

local $^W;

my $error = $GT::SQL::error;

$error =~ s/\n/<br>\n<li>/g;

$self->add_form("<font color=red><ul><li>$error</ul></font>");

}

But I thought that GT = the directory name, SQL = the file name and error = the subroutine name. What exactly does error refer to because there is no sub error in GT/SQL.pm? Please explain.

Specifically what I am looking for (apart from wanting to understand how everything works) is the part of the scipt that loops through each field and determines if there is an error, what kind of error and on how many fields. Where can I find that code?

Thank you.

Simon.
Quote Reply
Re: [jai] $GT::SQL::error; In reply to
$GT::SQL::error is a public variable which will be returned the error message when the SQL command is invalid.

TheStone.

B.