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

Hi, I am trying to build a simple web interface to a mySQL db which allows users to construct queries in a similar fashion to an Access DB. The question is, I have a section where the user creates his/her joins between the tables. I would like them to be able to drag and drop one column onto another and a line be drawn between the two tables linking the 2 columns. Could someone point me to relevant modules? Thanks in advance

Replies are listed 'Best First'.
Re: drag and drop widgets
by BorgCopyeditor (Friar) on Jul 30, 2002 at 19:49 UTC

    You could try DBI::MySQL::Table-Join::Drag-n-Drop :)

    Seriously, though, you haven't given enough information about what you're trying to do (is this on a web-page? a particular OS? multiple OS's? a cell phone?), and the thing you're trying to do involves integrating several different elements (database, window environment), meaning several different modules (which themselves will be different depending on your answers to the first group of questions). I'm guessing this is why you haven't got any answers yet.

    BCE
    --Your punctuation skills are insufficient!

      yep, sorry about that. I was in a rush and didn't think to make myself clear.

      I think I may have found the answer with the TCL/Tk browser plugin and using

      Tk::DragDrop; Tk::DropSite;

      OK, this is all in the web browser. Users would be heavily netscape and IE biased.

      I'm fine with DBI, CGI modules. That end of things is all covered.

      I just want some nice way of enabling the user to choose which column from one table maps to another column in another table. I could do this by listing all columns for each table with a text box next to each one and the user then puts in a code (1 or 2 or 3 etc) in order to identify which column from one table joins a column in another table. i.e columnA from table1 might map to columnC from table2, so I would put a 1 in each of the boxes.

      This seems rather messy and so I thought there must be a way, in an applet say, of dragging and dropping one column onto another annd noting the coordinates of the start position and the end.

      cheers