I am working with WebSql and I am having the following problem.
I am expecting the results to be returned within the browser but instead
it tries to print our the perl script. If I comment out the block of
code marked with '#' then it return the data in the browser. Could
anyone tell me why this block is causing it to try to save the file to
the disk.
The code is
$rc = ct_sql($ws_db, "$procedure");
if ($rc != CS_SUCCEED) {ws_error("ct_sql() failed");}
while ($ret=ct_results($ws_db, $result_type) == CS_SUCCEED)
{
if ($result_type == CS_ROW_RESULT)
{
print "<TABLE BORDER>\n";
{
elseif (result_type == CS_STATUS_RESULT)
{
# $status = ct_fetch ($ws_db);
# ct_fetch ($ws_db);
# }
# else {
# ws_error ("Unexpected result type returned from SQL"); }
}
print "</TABLE>\n";
}
}
print qq!
</BODY>
</HTML>
!;
}