The K Desktop Environment 

The KMySql Handbook

Frédérik Bilhaut,  bilhaut_f@mail.cpod.fr
Version 1.1, Oct. 1998


This Handbook describes KMySql Version 1.1.0 

 

Warning: there is no real documentation yet. This page describes only some non intuitive features of KMySql.

The Forms feature

Starting with the 1.1.0 version, KMySql provides a new feature, called Forms. A form is a window containing a set of widgets, and which can create and execute  an SQL query depending of the information provided by the user of the form. At this time, this feature is not really advanced, but should be improved in next releases.

1. Creating forms

    Select the Form editor item in the Forms menu of the main window. A new window will appear, which allows you to create, save and edit forms. This window contains a field where you type the name of the form. Then, you see a list, which will contain the list of the widgets you wish to use in your form.
    Click New to create a new field. Then a new window appears, allowing you to set the name of these field, and its type. At this time, only two type of fields are available: text field and combo box. A Text field allows the user of the form to type a text. A combo box allows the user to select one item from a list. Then click OK.
    This way, you create the list of the entries you want to offer to the user of your form. Then you just have to type the query in the field at the bottom of the window. You can use in this query the value which will be typed by the user of the form, just typing the name of the field, between two "%".
    For example, if you created two fields, named "Name" and "LastName", you can enter the following query: SELECT * FROM Users WHERE name="%Name%" AND lastName="%LastName%". Be careful, in the case of a string value, to add some double quotes. Always remember that the value of such a variable is exactly the same as the text of the field (or the combo selection).
    Then you must save your form in a file, using the File menu. You can also edit the form file by hand, which is a human readable text file.
 

2. Using forms

    There are two ways to run a form. You can select Run form in the Forms menu. Then simply choose the file containing the saved form.
Otherwise, you can add a form to the Forms menu, selecting Add form. In this case a new item is appended to the Forms menu, and you can run  the form from the menu. To delete a form from the menu, select it in the Remove form sub menu.
    When you run a form, a new window appear, containing all the fields of the form. Clicking on Submit, the resulting query is send to the server, and the result is
   Of course, the resulting query will only work if the client is connected.