it is a funtion included with lsql.. i believe it is in the gt:sql:table.pm .. this is it:
# Returns true if first argument is a primary key.
sub _is_pk {
for (@{$_[0]->{schema}->{pk}}) {
return 1 if $_ eq $_[1];
}
return 0;
}
-------------
this is how it is used in GT/SQL/Display/HTML/Table.pm
.....
# Display any search options if requested.
if ($self->{search_opts}) {
$out .= qq~<td $self->{td} width="10%"><font $self->{val_font}>~;
$out .= $self->_mk_search_opts(
{
name => $field_name,
def => $self->{cols}->{$col},
pk => $self->{db}->_is_pk($col),
unique => $self->{db}->_is_unique($col)
}
) || ' ';
$out .= "</font></td>";
}
..............
could i be missing a " use GT:SQL:table
if you open fileman and do a search contents for '_is_pk' you should get the files i'm talking about.
# Returns true if first argument is a primary key.
sub _is_pk {
for (@{$_[0]->{schema}->{pk}}) {
return 1 if $_ eq $_[1];
}
return 0;
}
-------------
this is how it is used in GT/SQL/Display/HTML/Table.pm
.....
# Display any search options if requested.
if ($self->{search_opts}) {
$out .= qq~<td $self->{td} width="10%"><font $self->{val_font}>~;
$out .= $self->_mk_search_opts(
{
name => $field_name,
def => $self->{cols}->{$col},
pk => $self->{db}->_is_pk($col),
unique => $self->{db}->_is_unique($col)
}
) || ' ';
$out .= "</font></td>";
}
..............
could i be missing a " use GT:SQL:table
if you open fileman and do a search contents for '_is_pk' you should get the files i'm talking about.