*************************************************************************
                      XmySQL (c) Rick Mehalick 1997
*************************************************************************

XmySQL is a front end to the MySQL database engine.  It allows for
simple queries and table maintenance, as well as batch queries.
XmySQL has been compiled and tested on Linux 2.0.0 with MySQL 3.20.16 
and Xforms version 0.86.  The Makefile should need very little 
modification, but I can't make any promises.

You can find Xforms at: http://bragg.phys.uwm.edu/xforms
You can find MySQL at : http://www.tcx.se
You will also need Xpm: ftp://avahi.inria.fr/pub/xpm  

To use XmySQL (SOURCE DISTRIBUTION):
	
	- unzip the file:     gzip -d xmysql-?.?.tar.gz
	- untar the tar file: tar -xvf xmysql-?.?.tar
	- copy Makefile:      cp Makefile.Linux Makefile
	NOTE		      set the INSTALLPATH in the Makefile
	NOTE		      set the XPM_PATH in the Makefile
	NOTE                  set the HELP_PATH in the Makefile
	- compile XmySQL:     make
	- run XmySQL:         xmysql 
	               [-host host] [-user usr -password pw] [-qlimit #]

To use XmySQL (BINARY DISTRIBUTION):
	- unzip the file:     gzip -d xmysql-?.?.tar.gz
	- untar the tar file: tar -xvf xmysql-?.?.tar
	- set environment variables
	For example: 
		The BASH or KSH would have:
			export XMYSQL_XPMDIR=/some/dir/to/xmysql/xpm/file
			export XMYSQL_HLPDIR=/some/dir/to/xmysql/help/file
		The CSH would have:
			setenv XMYSQL_XPMDIR /some/dir/to/xmysql/xpm/file
			setenv XMYSQL_HLPDIR /some/dir/to/xmysql/help/file
	- run XmySQL:         xmysql 
	               [-host host] [-user usr -password pw] [-qlimit #]

NOTE:	If you get a nasty message about all colors being used when you
	start xmysql, try adding -shared, -stdcmap, or -private to the
	command line of xmysql.  These are options are passed onto Xforms
	so that color support can be better.  I have a report from one
	user that -shared has worked for him.
	ex: xmysql -shared

When the gui comes up, any databases will be listed in the Databases
browser.  All buttons will be greyed out until a database is selected.
You MUST use the mysqladmin program to create databases, so please
see the MySQL documentation.  If you have MySQL installed correctly,
you should see the mysql database listed.

Once a database is selected, the database's tables will be listed in 
the Tables browser.  At this point the "Batch SQL" and "Admin Tables" 
buttons will be available.

The Batch SQL dialog allows you to load a batch file for selective
processing.  The Batch SQL browser will be loaded with the file.
To submit the query or command, highlight the lines and press the
"Submit" pushbutton.  The idea is that you can create a file with 
queries, etc. that you routinely run one after another, or to 
initialize a database. If the batch query has any output, it will
be displayed in the Results dialog.

The Admin. Tables dialog allows you to create, drop or alter tables.
The dialog contains a command list and data types list.  You can either
enter all of your SQL statements in the freeform window, or use the
command and data types lists to speed your input.  You can also
save your query via the "Save" button and use it again via the 
"Load" button.

By selecting a table from the Tables browser, you can see the fields
in a table.  The "SQL Query" and "Quick Select *" buttons will also 
become available.  The "Quick Select *" button will display the 
results of performing a "Select * from {current table}.  If -qlimit 
was supplied on the command line, the number of results up to that 
amount will be displayed.  Otherwise all results are displayed. The "SQL
Query" button will bring up the SQL Query dialog.  Again you can
either enter all of your SQL statements in the freeform window, or
use the command, fields, conditionals, and operators list to speed
your input. You can also save your query via the "Save" button and 
use it again via the "Load" button.

Whenever a SQL statement is sent to the MySQL server, the Results
dialog will be displayed.  If the statement doesn't result in any
returned results, the status line is used for this indication.
The status line is also used to issue minor error situations.

Disclaimer:
 
This program is in ongoing development, thus it can have problems (bugs)
which I will correct as soon as I am aware of them and have time. I
assume no responsibility for loss of data or problems associated
with the supporting programs (Xforms, MySQL and other software)
that may occur.

This version also has limitations. I'm sure you will find some :)
I really do plan on looking into making XmySQL more
MySQL aware, but I can't say when that will happen.  I also welcome
feedback for changes.
 
I reserve the copyright to XmySQL. However, you are permitted to 
distribute XmySQL, provided that you (a) distribute it with the 
full sources, and (b) that you leave this documentation and 
copyright notice intact.
 

Caution:  I have included the Xforms Xmysql.fd file in this release,
          but don't use it without first copying it to a temp 
          directory and using fdesign from there, otherwise a save 
          from fdesign will mess things up.  The reason is that I 
          modified the fdesign generated files.  I know, I know, 
          bad idea, but anyway, you've been warned.

FINAL NOTE:
	Take a look at the CHANGES file for more information. I use it
	like a user guide.

Rick Mehalick
dblhack@wt.net
rmehalic@i-o.com
http://web.wt.net/~dblhack





