Direct Editing of ST Comments
You need to have an account on our mysql server for any of the stuff below to work. Get
Isaac to set you up. You'll probably want to be careful with these commands since they
may well delete stuff. No, I haven't done that! Just thought it would be a good warning
to include here
--
WalterTautz - 21 Mar 2006
You can access the database via any tool that speaks the MySQL protocol. The
PhpMyAdmin web interface may be convenient, or you can use the command-line "mysql" tool.
Type
mysql
. If you've got a .my.cnf file in your home directory you can have
it automatically provide a password, server that your connecting to. For example,
[client]
host=database.cs
user=wtautz
password=xxxxxxxxxxx
I've obviously not included my real password
You may find the general
http://dev.mysql.com/doc/ helpful. Basically this is how
I managed to get mysql to talk to me.
So once you've typed mysql at the shell prompt on cscf.cs you'll be presented with
a mysql prompt:
mysql>
It means mysql is waiting for you to type some queries in. Most such commands need to
be terminated by a semi-colon.
How do I look at ST data?
Answer:
use rt-math-1;
It's table. What are the values? Type
describe transactions;
which yields the output:
mysql> describe transactions;
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| effective_sn | int(11) | YES | MUL | NULL | |
| serial_num | int(11) | YES | MUL | NULL | |
| actor | varchar(100) | YES | | NULL | |
| type | varchar(20) | YES | | NULL | |
| trans_data | varchar(255) | YES | | NULL | |
| trans_date | int(11) | YES | | NULL | |
| trans_prev | varchar(255) | YES | | NULL | |
| content | text | YES | MUL | NULL | |
+--------------+--------------+------+-----+---------+----------------+
9 rows in set (0.00 sec)
How do I list the transactions for one of my ST items?
Answer: It turns out the ST number you see on the web interface is specified
by the variable
effective_sn
. So we do:
select content from transactions where effective_sn = 'xxxxxx';
where
xxxxxx is, of course, an actual number. Duh. This particular command
will generate the text (as specified by the table variable
content
) of all
the transactions associated to ST xxxxxx.