wolf25 has asked for the wisdom of the Perl Monks concerning the following question:

Yes, currently im trying to develop GUI application using Perl TK with MySql database with CGI support, basically im using CGI website as interface to the site’s users (separate application), which I have no problem with, and as administrative interface im using window application developed by perl Tk module. The idea is to take some data from Mysql database and display them as table to the users, I know how easy this can be by using the GUI->CGI, where u only need to put a table in while loop along with the fetched rows, but in perl TK, its quite difficult, Coz u cannot imbed table in the while loop, I need to use an advanced widgets such as tk::HList as table to display mysql data on it, and the question is: when the table is displayed, I want to get the ID when I click on any of the displayed rows in the newly generated mysql table, just like when u use GET or POST in CGI. I hope u understand what I mean, and thanks in advance.

Replies are listed 'Best First'.
Re: Perl TK + MySQL, advanced widget
by Joost (Canon) on Jun 20, 2005 at 18:20 UTC
      Hi, I thought my comments will be displayed here when I replay to a person, Anyway, in case if u guys didn’t get it; The Tk::DBI::Table works fine, and I can get the mysql table displayed perfectly, but how can I click on any of the generated rows and retrieve it’s ID, to clear up; I have cars table, and when I click on specific car, I want it to open new window to view the car pic, and I can’t do that without car ID, the Tk::DBI::Table is not clickable. Yes I tried to work round the Tk::TableMatrix and it’s not clickable either. Cheers,
Re: Perl TK + MySQL, advanced widget
by NateTut (Deacon) on Jun 20, 2005 at 18:47 UTC
Re: Perl TK + MySQL, advanced widget
by PerlingTheUK (Hermit) on Jun 20, 2005 at 21:56 UTC
    Apart from the fact this exists already, I would use the strength of perl and dbi to kepp this dbms independent.

    Cheers,
    PerlingTheUK