module Mysql: sig endval connect : string -> string -> string -> string -> int -> intMysql.connect host user password database tcp_port unix_socket
returns an identifier for this connection that should be passed on to all the operations on this connection. Empty values or zeros given to parameters indicate default behaviour.val query : int -> string -> int * intconnection is used for this query and the result is a tuple with the number to be used to read the records and the number of affected records by the queryval record : int -> (string * string) listquery-id inside a set of pairs (fieldname, value), an empty list marks the end of the table or empty resultsval close : int -> unitconnectionval scan : string -> string * string listquery for expressions between question marks and creates a tuple with the expression to build the query and the list of field names of the resulting records.
To be compatible to the future use of prepared queries (MySQL 4.1 and later) the question mark expressions can only replace normal contants in the query. The prepared statements will be available when MySQL 4.1 becomes the normal stable MySQL soon.
Examples:
insert into table address (name, address, job) value (?name?, ?address?, ?job?)
select 'dear '+name as opening, address where job like ?job_filter?
val finish : unit -> unitval enum : int -> string -> string -> stringenum connection table field