in reply to Need GUI for easy query and results
How do I get the HTML text fields to complete a query
run the query, SQL I think
I mostly use DBD::SQLite a subset of DBI, but at times use DBD::mysql.
All the DBI routines share the same query model. first you connect
(above xample from DBD::SQLite)my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","");
then you run$sth = $dbh->prepare("SELECT foo, bar FROM table WHERE baz=?");
(above example from DBI)$sth->execute( $baz ); while ( @row = $sth->fetchrow_array ) { print "@row\n"; }
display results on the same HTML I started with?
Well that isnt quite true, you get some HTML, fill in the form, press the submit button, then you get NEW HTML back. But it will probably be from the same address. For the most part the same cgi code will first construct the page with the empty form, then when you press submit get the input from your browser, execute your sql from the input fields, then construct a page with the results and another form.
|
|---|