On 01/30/17 11:43,
array.ove...@gmail.com wrote:
Note, don't multipost, do a crosspoost (one post which goes to multiple
newsgroups).
There is no direct replacement, but as it's just a stupid alias for
query with one and only one query that can be executed, "SHOW
DATABASES", so you can do it with mysqli (not tested):
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
if ($result = $mysqli->query("SHOW DATABASES")) {
if($result){
// Cycle through results
while ($row = $result->fetch_object()){
echo $row ."\n";
}
// Free result set
$result->close();
}
$mysqli->close();
?>
or you can do it with PDO_MYSQL, but that example I leave to you to make
it yourself.
--
//Aho