   ?  help                             -  toggle screen and mysql output to file
   {  delete a record                  )  check the statistics of a file  
   }  set mysql parameters(pipe line)  ,  toggle display of mysql output sql
   [  drop a field                     (  change user path for files
   ]  toggle mysql parameters          *  invert a mysql query(not)
   1  create a field cryteria list     2  execute a field cryteria list
   3  send a file directly to mysql    4  set mysql permissions
   5  display a file                   6  send a | delimited file to mysql
   7  export | delimited data to file  8  toggle between pipe line and socket
   9  convert dbf text files to mysql  0  toggle explain in searches
   a  add a record                     b  save the capture file to disk
   c  sql reserve words                d  describe a table
   e  multi field select      f  choose fields
   g  optimize a table                 h  add an AUTO_INCREMENT field
   i  create a database directory      j  toggle distinct in searches
   k  environment variables            l  list databases
   m  this menu                        n  create a new table
   o  execute a capture line           p  toggle case conversion
   q  query all fields                 r  replace a record
   s  open a database                  t  list the tables in the database
   u  update a table                   v  view the capture array
   w  count the records in a table     x  type a command 254 chars per line
   y  drop a table                     z  dump a database or table to file
This program is covered under the GPL
as listed in COPYHEADER and COPYING.
Here is the menu again.
Except for the a command, their functions are similar. Keyspk has a smaller menu.

The ? command lists the help.
In the program menu, the help command also lists the parameters which are
listed in the mysql manual which is part of the mysql package
available from www.mysql.com and ftp.mysql.com and their mirrors.

The -  command toggles between screen mode and file mode.
This allows you to send mysql output to a file or to the scree.
the file is $0.log or filename.log where filename is the call for menu.pl.

   {  delete a record
Allows you to delete a record or row for a table.
You are asked for the table name and a query for the record.

   )  statistics of a file
You are asked for a file name and a bunch of information is given.

}set mysql parameters
This command allows you tochange the parameters for mysql if you are root
It only works through the pipe as I haven't figured out how
 to do it with the socket which doesn't fully support all the parameters.

    *  invert a mysql query
changes like to not like in the query string thatyou can set in the   q  co
which is set as ambiguuous by default.


[ drop a field
this removes a field from the table. You cannot drop a field in the mysql
database.

(set the user path for files
This allows you to change your working directory.

1 create a field cryteria list
this allows you to choose fields in as many tables as you wish.
You will be first asked for the number of tables you want.
Then you are asked for the table name.
When you are using the socket, you can choose tables, fields and databases an
field types by number. You are asked whether you want this field (Y, N)
You can type anything but y to cancel the field.
The program doesn't care on the negatives.
if you leave the field blank, the list will terminate and you will move on
to the next table  until the number of tables is exausted.
Once completed, you are asked for a file name.
The file is very simple. It is just a list of field names
between the table name. The program then places it inan ordered list.

2   execute a cryteria list
you are asked for the cryteria file and then a 
query string.
This allows for different queries on the same cryteria.

3 send a file to mysql
you send a file to mysql via the pipe.

4 set mysql permissions.
They ar complecated.
you are buest toread the perlmission section of the mysql manual.
There are only 5 choices on the permissions menu
granting various permissions for specific users on specific databases.

5 display a file
allows you to display files.

6 Send a | delimited file to mysql.
you can choose delimiters for the fields.
you are asked for the file name and away it goes.

7 export a | delimited file
sends a | delimited block of text to file
This is all covered in the mysql manual.

8 toggle between the pipe line and socket
This command does what it says.
the socket connection stays open as long as you need it.
the pipe opens and closes with each each command.
Now you can see why i wrote the programs.
mysql, as does any database program, requires
a lot of typing.

9 send a dbf text files to mysql. You
will probablly never need this but you can use ideas from its code to send foreign
data to mysql.

0
Toggle explain 
I read about it in the manual so I put it in.
it simply adds the word explain to a search which produces more output.
I have never used or neeeded it.

The a command adds a record to mysql.
you simply goe through the fields and strenuuously fill in the data. you must go  through all the fields to satisfy the
sql rules. It is easier to send data by the pipe.

b  save capture file to disk
Everything that you send to mysql is saved in an array. This command saves 
the array to disk so that you can edit it and use the 3 command
to send the file to mysql.

c  msql reserve words
an alphabetical list of msql reserve words squeezed onto 1 screen.

d describe a table
You are asked for a table name and a description of the fields is sent to you
You will have to press the enter a few times if you have a database with lots
of fields in it as several lines are used.


e multifield select 
similar to the 1 command create a cryteria file.

f choose fields 
allows you to select som fields without the boter of a cryteria file.

g optimize a table
causes mysql to rewrite the table.

h ad an AUTO_INCREMENT field.
this is a special field that must be indexed and must be the last field of
a table.

i create a new database
this creates an empty directory for a database without any permissions set.

j toggle distinct in searches

k environment variables

l list databases


m this menu

n create a new table.
you are asked for a new table name under the logged database.
you are asked if you want a default string for your table.
if you answer n or N,
the program will not ask for a default field.
the number of fields is determined if you leave the field name blank.
There are several field types which are listed for you.
some field types do not require a field width so this question is ignored.
If you make an err you can select aa number and the array goes back to th
fiield.
if you go back, you will loose everything afterthe error.
you shouldn't wory if you make an error because you can save your table
ion to disk with the b command.
wonce you have completed all your fields you are asked
for indexes.
the first index is the primary index where you can select several fields
you ccan choose the field names by number as you can the field types. 
This also applies to database names, field names and table names when using the socket.

o execut a line from the capture array

p toggle case conversion
3 choises off upper and lower case.
you can press p 
at any prompt to change the case setting.
the program disables it for file names and field, type table and database names.
you can simply press p
and then the enter key tochang the case and then enter your request.
p is parsed in the query{
function before any of the other characters.
the queries are filtered for damaging characters.
you can change this by editing the query{ function.

 q query a table

r replace arecord
it is the same as a  ad a record except that it uses REPLACE instead of INSERT.

s select a database

t list tables

u update a field
this command allows you to change a specific field.
The mysql database is exempt from this command it is the mysql house
keeping database.


v view the capture array.

w count records in a table

x send a command to mysql
this allows you to send commands to mysql.
This is necessary because commands caan get huge.
check the example at the end of the tutorial in the mysql manual.


y drop a table.

this command is disabled in the mysql database as is any other distructi
command.
Z dump a database. you can dump tables or a database
this is how the databases are backed up.
it takes up less space to save the data in this way.
I dont pretend to be and am am not a good document writer so I hope that this listing has given you an oppertunity to use mysql and this program with 
ease and enjoyment.
You can use the macros you create in keyspk to save you typing in this program.

Barry Pollock
box 303
40 Queen street unit B
Ripley, Ontario Canada
N0G 2R0
519 395 4469
http://www.hurontel.on.ca/~barryp
barryp@hurontel.on.ca
