Name

Msql::dropdb

Synopsis

$result = $db->dropdb($database);

Msql::dropdb takes as its argument the name of a database to destroy. It then sends the destruction request to the mSQL server. The command is sent as the same user running the CGI program. Thus, to work in a CGI program, the program must be run as a user with the right to destroy the database. The function returns -1 on failure and on success. This function does not ask for any confirmation and the results are permanent. Thus, this function should be used with the most extreme caution.

Example

use Msql;
my $db = Msql->connect;
my $result = $db->dropdb('mydata');
die "Command failed!" if result == -1;
print "'mydata' is now gone forever.\n";

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.