| Calling Sequence | MySql(query)
| |||||||||||||||||||||||||||
| Parameters |
| |||||||||||||||||||||||||||
| Return Type | MySqlResult | |||||||||||||||||||||||||||
| Synopsis | The MySql function can be used to access any MySQL database. The passed query in sql format is executed on the (remote) server and the result is returned to the user. | |||||||||||||||||||||||||||
Optional arguments and their default values: | ||||||||||||||||||||||||||||
setParseColumns A list/set of integer to indicate which columns should be parsed. Unparsed columns appear as strings in the result. By default, no columns are parsed. | ||||||||||||||||||||||||||||
host=string The URL where the MySQL server is running. The default is 'linneus54.inf.ethz.ch'. | ||||||||||||||||||||||||||||
user=string The username to be used when connecting to the server. The default username is 'darwin'. | ||||||||||||||||||||||||||||
password=string The password to be used when connecting to the server. By default, no password is used. | ||||||||||||||||||||||||||||
port=string The TCP/IP port number of the server. If no port number is provided, the default MySQL port is used. | ||||||||||||||||||||||||||||
database=string The name of the database to use. The default database is 'vpeikert' if the host is linneus54, otherwise no database is selected. | ||||||||||||||||||||||||||||
| Examples | > MySql('Select genome_5letter, entry_nr, entry_seq from
genome, entry where entry_id IN (44,45) and entry_genome_id=genome_id'):;
MySqlResult([genome_5letter, entry_nr, entry_seq],[[BACSU, 44, MAKTLSDIKRSLDGNLGKRLTLKANGGRRKTIERSGILAETYPSVFVIQLDQDENSFERVSYSYADILTETVELTFNDDA ASSVAF], [BACSU, 45, MGRRRGVMSDEFKYELAKDLGFYDTVKNGGWGEIRARDAGNMVKRAIEIAEQQMAQNQNNR]]) > MySql('Select * from oma where oma_id=9233', database='oma_sep08');
MySqlResult([oma_id, oma_entry_id],[[9233, 1039323], [9233, 1107833], [9233, 2057091], [9233, 2201433]]) | |||||||||||||||||||||||||||
| See also | MySqlResult, OpenPipe, OpenReading, ReadRawFile | |||||||||||||||||||||||||||