The host to connect to (typically 'localhost')
The name of the MySQL user that will be used with this connection
The given user's password
The name of the MySQL database A Wee Tiny Blog is to use
In order to work, each A Wee Tiny Blog object needs to be able to access the MySQL database that contains the table with the blog entries. This method is the usual way of setting up that connection, and it only needs to be called once per script.
Alternatively, you can create the handle to your MySQL database using PHP's mysqli_connect
functions. Pass the handle returned by mysqli_connect
to A Wee Tiny Blog's UseConnection
method to connect the object to the database.
If the connection is successful, this function returns TRUE.
Otherwise, it returns FALSE and sets the internal error flag. Call GetLastError
for more details about the error.