Two mSQL extensions exist, one for mSQL version 1 and one for version 2. You must
load the appropriate extension to enable the functions in this section. Zeev Suraski wrote
both mSQL extensions.
integer msql_affected_rows(integer link)
The msql_affected_rows function returns the number of rows involved in the previous
query made on the given link. The link argument must be an integer returned by
msql_connect or msql_pconnect. For an example of use, see msql_db_query, below.
boolean msql_close(integer link)
The msql_close function closes the link to a database. If the link argument is left out, the
last-opened link is closed. Only links opened by msql_connect may be closed. Using
this function is not strictly necessary, since all nonpersistent links are automatically
closed when a script ends. For an example of use, see msql_db_query, below.
integer msql_connect(string host, string username, string
password)
The msql_connect function attempts to connect to the mSQL server at the specified host.
If the host argument is left out, the local host will be assumed. A link identifier is
returned. In the case where an open link exists, it will be returned rather than establishing
a second link. The connection is automatically closed at the end of the script.
You may add a colon and a port number to the host argument.
boolean msql_create_db(string database, integer link)
The msql_create_db function attempts to create a database. The link argument is
optional. If left out, the last-opened link will be used.
<?
$Link = msql_connect("msql.clearink.com");
msql_create_db("store", $Link);
msql_close($Link);
?>
boolean msql_data_seek(integer result, integer row)
Use msql_data_seek to move the internal row pointer to the specified row in a result set.
The result argument is as returned by msql_query.
<?