Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
a68a39de
Commit
a68a39de
authored
Apr 10, 2013
by
Laurent Gil
Browse files
Fixed the issue to get the list of columns from the SQL query.
parent
80358a4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
misc-scripts/sql2html.pl
misc-scripts/sql2html.pl
+7
-9
No files found.
misc-scripts/sql2html.pl
View file @
a68a39de
...
...
@@ -476,7 +476,7 @@ foreach my $header_name (@header_names) {
$html_content
.=
add_table_name
(
$t_name
,
$colour
);
$html_content
.=
add_description
(
$data
);
$html_content
.=
add_info
(
$data
->
{
info
});
$html_content
.=
add_info
(
$data
->
{
info
}
,
$data
);
$html_content
.=
add_columns
(
$t_name
,
$data
);
$html_content
.=
add_examples
(
$t_name
,
$data
);
$html_content
.=
add_see
(
$data
->
{
see
});
...
...
@@ -793,10 +793,13 @@ sub add_description {
# Method generating the HTML code to display additional information contained in the tags @info
sub
add_info
{
my
$infos
=
shift
;
my
$html
=
'';
my
$data
=
shift
;
my
$html
=
'';
foreach
my
$inf
(
@
{
$infos
})
{
my
(
$title
,
$content
)
=
split
('
@info@
',
$inf
);
$content
=
add_internal_link
(
$content
,
$data
)
if
(
defined
(
$data
));
$html
.=
qq{
<table>
<tr class="bg3"><th>$title</th></tr>
...
...
@@ -1001,13 +1004,8 @@ sub get_example_table {
my
$table
=
shift
;
my
$nb
=
shift
;
my
$html
;
if
(
!
defined
(
$db_handle
))
{
}
$sql
=~
/select\s+(\S+)\s+from/i
;
$sql
=~
/select\s+(.+)\s+from/i
;
my
$cols
=
$
1
;
my
@tcols
;
if
(
$cols
eq
'
*
')
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment