eboxy MySQL plugin 0.2
----------------------

This plugin allows you to read data from a MySQL database from within eboxy.


Usage
-----

Once the plugin is loaded, you can connect to a database by calling the
connect() method, supplying the username, password and database name. Then
use the query() method to run an SQL query. This query can be any SQL
statement that MySQL can accept. If it returns some data (ie, a SELECT
statement) then the data will be fetched.

For retrieving data, the MySQL plugin can be used in either of two ways:
binding widgets using the bindwidget() method, so that their values are
updated whenever the dataset is scrolled; or by using the fieldbyname()
method to get field values manually. Scroll through the rows using the
next() method.



Reference
---------

Properties:

  hostname
    The host name/address of the database server (default is "localhost").

  port
    The port to connect to on the database server (default is 3306).

  rows
    The number of rows in the current result set.

  bindingenabled
    True to enable updating bound widgets, false otherwise (default is true).

Methods:

  connect(username, password, dbname)
    Connect to a MySQL database.
  
  query(sql)
    Run an SQL query.

  first()
    Go to the first record in the result set.
  
  next()
    Go to the next record in the result set.

  previous()
    Go to the next record in the result set.

  fieldbyname(fieldname)
    Get the value of the named field.

  bindwidget(widgetname, fieldname)
    Bind a widget to a particular field. Currently supports textfield, label,
    togglebutton and picture widgets.

  unbindwidget(widgetname)
    Unbind a previously bound widget.

Events:

  OnScroll
    occurs whenever the dataset is scrolled (moves to a different row). Also
    occurs when the query is run (ie, the first row is retrieved).

  
Todo
----

- Better EOF handling
- Handling of multiple datasets at once
- Live editing of dataset



eboxy
-----

eboxy is a GUI system for set-top boxes. For more information on eboxy, visit:

  http://eboxy.sourceforge.net

If you have any questions or suggestions, please send them to the eboxy mailing
list at eboxy-users@sourceforge.net.


Licence
-------

This plugin is released under the GPL, version 2 (or a later version, at your
option). For more information on the GNU GPL please visit http://www.fsf.org.
