This is more of a design aspect question. I recieve these results in my perl script, then perform an SQL query using those parameters. I want this page to be a preview of the database results returned by the query.$client_name = $query->param('client_name'); chomp $client_name;
This will all be nested within a table. For example:$sql = "SELECT * FROM tblClient(NOLOCK)"; my $sth = $dbh->prepare( $sql ); $sth->execute; while ( my $result = $sth->fetchrow_hashref ) { if ($result->{Client_Name} =~ /$client_name/i){ print "$result->{Client_Name}"; print "$result->{Email}"; print "$result->{Address}"; print "$result->{Phone}"; print "$result->{Fax}"; # Count is used to store the number of matches $count++; }
------------------------------------------------------
Name | Address | Phone | Order Date | More info |
------------------------------------------------------
Frank | 2 Dunedin | 34243 | 11/02/2001 | click me |
------------------------------------------------------
.........
.........
I want to use the More info column to allow the client to click to view specific information regarding a given client. As i am using CGI i have thought about 2 methods. One: incapsulate each row within a <form> </form> and use the More info column as a "submit" button. If i use this method which could be completely wrong, will i have to use text boxes to display the data (There is no need for these values to be edited). The second method would involve storing the values returned by the database in a hash array. Could someone please point out to me the common technique for achieving my goal. I'm sure this has been done thousands of times before. I hope i managed to explain my problem.
Thankyou very much for your time
Digger
janitored by ybiC: Balanced <code> tags around codeblocks instead of HTML formatting markup
In reply to Database Search by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |