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
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