Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1065691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T19:52:00+00:00 2026-05-16T19:52:00+00:00

Here is the table in which ia am retrieving the data from sqlite,, at

  • 0

Here is the table in which ia am retrieving the data from sqlite,, at the top of
this datagrid i need a filter button and 2 text boxes..1 for userId and 1 for
userName…All i need is tha as a enter the userid and username the record
confined to tha id or name should appear …Please do help me..am newbie to perl…

#!C:\perl\bin\perl.exe

use CGI;
use CGI qw/:standard/;
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
my $q = new CGI;
use DBI;
use CGI qw(:all);
use warnings;
print $q->header ( );
my $dbh = DBI->connect(
        "dbi:SQLite:DEVICE.db",
        "", "",
        {
            RaiseError => 1,
            AutoCommit => 1
        }
    );
 my @rows = ();
 my $sql = "SELECT UserId,UserName,CardNo,GroupId,Role,VerifyType FROM UsersList";
 my $sth = $dbh->prepare($sql) or die("\n\nPREPARE ERROR:\n\n$DBI::errstr");
  $sth->execute or die("\n\nQUERY ERROR:\n\n$DBI::errstr");
 print '<table>';
 print "<tr>";
 print "<th>$sth->{NAME}->[0]</th>";
 print "<th>$sth->{NAME}->[1]</th>";
 print "<th>$sth->{NAME}->[2]</th>";
 print "<th>$sth->{NAME}->[3]</th>";
 print "<th>$sth->{NAME}->[4]</th>";
 print "<th>$sth->{NAME}->[5]</th>";
 print "<th>  EDIT  </th>";
 print "<th>  DELETE  </th>";

 while (my @row = $sth->fetchrow_array) {
  print "
 <tr>
 <td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
 <td>$row[3]</td>
 <td>$row[4]</td>
  <td>$row[5]</td>
  <td><A HREF=\"\">EDIT</A></td>
  <td><A HREF=\"\">DELETE</A></td>
   </tr>";
   }
   print "<tr style='background-color:#CDC9C9;'><td><A HREF=\"http://localhost/cgi- 
     bin/AddUser.cgi\">ADD</A></td><td></td><td></td><td></td><td></td></tr>";
   print"</table>";
   $sth->finish();
     $dbh->commit();
  $dbh->disconnect;


 print <<END_HTML;
 <html>
 <head><title></title></head>
 <body>
  <form action="UsersList.cgi" method="get">
 <TABLE align="center">

  <TR>
  <TD align="left">
 <input type="hidden" name="submit" value="Submit">

</TD>
</TR>
  </TABLE>

  </form>
   </body></html>
    END_HTML
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T19:52:01+00:00Added an answer on May 16, 2026 at 7:52 pm

    You can filter the records that are returned by added a ‘where’ clause to your SQL statement. You can get the parameters that have been typed into your text boxes by using the ‘param’ function from CGI.pm.

    You say that you want to filter the results as text is typed into the text boxes. That is harder. You would need to use Javascript and Ajax to do that.

    You seem to be a little confused about CGI and Perl. You are, for example, loading the CGI module three times and then only using one of its functions. I strongly recommend that you read something that will help you understand the underlying concepts before writing any more code. Ovid’s CGI course is a great introduction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the table in which I am retrieving the data from an SQLite
i'm new here. i create a table which can show the data from the
I have a table Items which stores fetched book data from Amazon. This Amazon
Here is my table in the dataset: SELECT tag_work_field.* FROM tag_work_field I created this
I am retrieving data from a SQL table so I can display the result
Here is HTML markup of 2 rows from my huge table (which generated by
I'm having trouble retrieving data from my database using Spring Jdbc. Here's my issue:
I am retrieving data from table but instead of all row, I want 20
We need to store a list of data we pull from another table that
Here is jquery code which hides my table cells with the ID of .style2:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.