Content deleted Content added
→External links: to latest version |
m change source to syntaxhighlight |
||
Line 39:
The following script could be run on a set interval through [[crontab]].
<
$mysqli = new mysqli('localhost', 'user', 'pass');
Line 48:
$mysqli->close();
}
</syntaxhighlight>
====Usage in an application====
<
if (apc_fetch('dbStatus') === 'down') {
echo 'The database server is currently not available. Please try again in a minute.';
Line 60:
$mysqli = new mysqli('localhost', 'user', 'pass', 'database');
$result = $mysqli->query('SELECT * FROM table');
</syntaxhighlight>
==External links==
|