HOW THE QUIZ WORKS:
Clicking the ‘randomize’ button situated above the reference table generates a new table whereby the function descriptions, function syntaxes, and function return values are randomized. The quiz involves matching the function descriptions, function syntaxes, and function return values to the correct function name. Information relating to the randomization of table cells will be displayed for three seconds, before disappearing.
On a desktop computer, table elements are selected by left-clicking the desired table cell and holding the left click in the mouse down position for one second before releasing the left click. The text inside the table cell will turn red to indicate that the one-second mouse left-click has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second left mouse-click process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second left mouse-click process on the original table cell.
To select a table element on a touchscreen device (mobile, tablet), simply touch the desired table cell and maintain the touch for one second before removing your finger from the screen. The text inside the table cell will turn red to indicate that the one-second touch has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second touch process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second touch process on the original table cell.
Normal touchscreen scrolling behaviour is exhibited by the cells with a light green background; cells without a light green background will not respond to normal touchscreen scrolling. The table is positioned in such a way that the user can also initiate touchscreen scrolling by swiping to the right or left of the table.
When a row consists of the correct function name, function description, function syntax, and function return value, the background colour of the row will change from ‘transparent’ to ‘khaki’; this provides visual feedback that the row is complete.
Once the entire table is complete, a paragraph of feedback will congratulate the user and provide the following information: date and time of quiz commencement; date and time of quiz completion; and the length of time it took the user to complete the quiz.
VIEWPORT OPTIONS:
PURPOSE:
This webpage serves two purposes:
- It provides a reference table for the PHP MySQLi functions, with information extracted and condensed from w3schools.com and php.net.
- It enables users to complete a quiz related to the PHP MySQLi functions.
USAGE:
For each PHP MySQLi function there are four table cells of information: the function name; the function description; the function syntax; and the function return value. There are three layouts available – ‘mobile‘, ‘tablet‘, and ‘desktop‘.
Click the relevant button below to display the PHP MySQLi functions reference table, sized appropriately for the desired viewport. A ‘RANDOMIZE‘ button appears above the reference table once the viewport is selected; clicking this button facilitates the commencement of a quiz.
Click the ‘RANDOMIZE‘ button to randomize the functional descriptions, the functional syntaxes, and the functional return information.
| FUNCTION NAME | FUNCTION DESCRIPTION | FUNCTION SYNTAX | FUNCTION RETURN VALUE |
|---|---|---|---|
mysqli::reap_async_query()mysqli_reap_async_query()
[mysqli::reap_async_query — mysqli_reap_async_query – Get result from async query] |
This function – only available with mysqlnd – is used to get (‘reap’) the result from an async query. | Object-oriented style:$mysqli->reap_async_query();
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::reap_async_query: returns a mysqli_result on success; FALSE on failure. |
mysqli::refresh()mysqli_refresh()
[mysqli::refresh — mysqli_refresh – Refreshes] |
This function flushes tables and caches, or resets [generally ‘refreshes’] the replication server information. | Object-oriented style:$mysqli->refresh(options);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::refresh: returns TRUE if the refresh was a success; FALSE otherwise. |
mysqli::release_savepoint()mysqli_release_savepoint()
[mysqli::release_savepoint — mysqli_release_savepoint – Removes the named savepoint from the set of savepoints of the current transaction] |
This function – not currently documented in the official literature available at php.net – removes [‘releases’] savepoint from the set of savepoints of the current transaction. | Object-oriented style:$mysqli->release_savepoint(savepoint);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::release_savepoint(): returns TRUE on success; FALSE otherwise. |
mysqli::rollback()mysqli_rollback()
[mysqli::rollback — mysqli_rollback – Rolls back current transaction] |
This function rolls back the current transaction for the database. | Object-oriented style:$mysqli->rollback(flags [optional parameter, with a default value of 0], name [optional parameter]);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::rollback(): returns TRUE on success; FALSE otherwise. |
mysqli::rpl_query_type()mysqli_rpl_query_type()
[mysqli::rpl_query_type — mysqli_rpl_query_type – Returns RPL query type] |
This function – deprecated and removed as of PHP 5.3.0 and not currently documented by the literature at php.net – returns an integer representation of one of the following constants: MYSQLI_RPL_MASTER [e.g. for INSERT / UPDATE queries]; MYSQLI_RPL_SLAVE [e.g. for SELECT queries]; or MYSQLI_RPL_ADMIN [e.g. FLUSH / REPAIR] depending on the query type. |
Object-oriented style:$mysqli->rpl_query_type(query);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::rpl_query_type(): returns an integer representation of a named query type constant. |
mysqli::savepoint()mysqli_savepoint()
[mysqli::savepoint — mysqli_savepoint – Set a named transaction savepoint] |
This function – not currently documented by the literature at php.net – sets a named transaction savepoint. | Object-oriented style:$mysqli->savepoint(savepoint);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::savepoint(): returns TRUE on success; FALSE on failure. |
mysqli::select_db()mysqli_select_db()
[mysqli::select_db — mysqli_select_db – Selects the default database for database queries] |
This function – used to change the default database for the connection – selects the default database to be used when performing queries against the database connection. The default database is initially specified via the fourth parameter of the mysqli_connect() function. |
Object-oriented style:$mysqli->select_db(database);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::select_db(): returns TRUE on success; FALSE on failure. |
mysqli::send_query()mysqli_send_query()
[mysqli::send_query — mysqli_send_query – Send the query and return] |
This function – deprecated as of PHP 5.3.0 and not documented in the literature at php.net – is presumably used to send the query and return. | Object-oriented style:$mysqli->send_query(query);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::send_query(): returns TRUE on success; FALSE on failure. |
mysqli::set_charset()mysqli_set_charset()
[mysqli::set_charset — mysqli_set_charset – Sets the default client character set] |
This function sets the default character set to be used when sending information to and from the database server. This is the preferred way to change the charset; using mysqli_query('SET NAMES utf8'); is not recommended. |
Object-oriented style:$mysqli->set_charset(charset);
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::set_charset(): returns TRUE on success; FALSE on failure. To use this function on Windows you must use MySQL client library version 4.1.11+; for MySQL 5.0 you need 5.0.6+. |
mysqli::set_local_infile_default()mysqli_set_local_infile_default()
[mysqli::set_local_infile_default — mysqli_set_local_infile_default – Unsets user defined handler for load local infile command] |
This function restores [‘sets’] the local infile default handler; the LOAD DATA INFILE LOCAL handler previously set with mysqli_set_local_infile_handler() is deactivated. |
Object-oriented style:$mysqli->set_local_infile_default();
Procedural style: [mysqli_link: a link identifier returned by |
mysqli::set_local_infile_default(): no value is returned. |

