Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Globals syntax problem

Quote Reply
Globals syntax problem
What is the correct syntax to quote the resultant variable as described below

The Global:

colsel

sub {
require GT::SQL::Condition;
my $tags = GT::Template->tags;
my $requestor = $tags->{requestor};
my $cd = GT::SQL::Condition->new(['requestor','=',$requestor]);
my $results = $DB->table('avo13')->select($cd,['reqphone'])->fetchall_hashref;
return { loop_select => $results };
}

With the HTML:
<%colsel%>
<%loop loop_select%>
<%reqphone%>
<%endloop%>


Returns:
GT::SQL::error = Failed to execute query: 'SELECT reqphone FROM avo13 WHERE ( requestor = ALBRANT, PAUL )
' Reason: You have an error in your SQL syntax.

What is the syntax to have ...requestor = 'ALBRANT, PAUL' ... quoted in the above global

Subject Author Views Date
Thread Globals syntax problem billdgt 4633 May 20, 2004, 5:37 AM
Thread Re: [billdgt] Globals syntax problem
604 4553 May 20, 2004, 12:21 PM
Thread Re: [TheStone] Globals syntax problem
billdgt 4551 May 20, 2004, 1:01 PM
Post Re: [billdgt] Globals syntax problem
604 4545 May 20, 2004, 1:45 PM