The K Desktop Environment

Next Previous Table of Contents

5. The SQL-script editor

Call it by clicking on "Database -> SQL Editor" when you are connected to your server.

The script editor is realy simple this moment. You can store/load scripts, execute it and save the results. The syntax is simple, too. Everey statement has to be completed with a ";<return>". The last line doesn't need this. For instance:

use test;
select count(*) from filelist;
select * from filelist
would be right. You can write one statement across more than one line. For instance:
use test;
select count(*)
       from filelist;
select * from filelist
will work, too. There is no limit of statements - only the memory ;).

When you press "Execute", kmysqladmin will execute the statements until an error occurs or all statements are done. In this version, you can not cancel a script, sorry. Next one I'll build it in. After doing the statement, the tab-rider "SQL Result" will spawn or the tab "SQL Error" if you had errors. Inside the status bar you can see, whats going on. Until the statements are done, you see "Running script".

You can insert comments like in "mysql" itself. For instance:

/* Opening Database */
use test;
select count(*) from filelist; -- want the count
select * from filelist; -- retrieve datas
One restriction exists: Not like in mysql you can not put more than one statement on one line. Means -
use test; select count(*) from filelist;
does not work.

Next Previous Table of Contents